Così funziona..

setcookie("username", $username, time()+360000, "/", "www.miosito.net", 0);