If you read cookies more you can actually put the domain in where you want the cookie stored. So
like this
boolean setcookie ( string name [, string value [, int expire [, string path [, string domain [, int secure]]]]])
an example
setcookie ("TestCookie", $value,time()+3600, "/~rasmus/", ".utoronto.ca", 1);