I have this code. Main script main.php: <?
$tmp = file('http://www.myhost.com/somescript.php');
?>
main.php and somescript.php are on the same server. for example www.myhost.com
How can I set cookie in somescript.php so that it will be available in next call to main.php ?
I tried setcookie('name','value',time()+86400,'/','www.myhost.com');
but it is not available in main.php
setcookie('name','value',time()+86400,'/','www.myhost.com');
that will set cookie trhat will only be available is subdomain www
needs to be setcookie('name','value',time()+86400,'/','.myhost.com');
Actually the server is melvil.ejha.sk So I need to set the cookie with domain .ejha.sk ?