[thelist] cross-domain cookies in Netscape

Anthony Baratta Anthony at Baratta.com
Mon Sep 25 15:02:37 CDT 2000

At 11:45 AM 9/25/2000, you wrote:
 > Is there anyway to accomplish this?? Any help appreciated.
 > Here's a code snippet:
 > #cookieset2.cgi
 > $expDate = "Sunday, 31-Dec-00 12:00:00 GMT";
 > $path = "/";
 > $domain = ".townvalues.com";
 > $uid=10101;
 > $cookie_string = "Set-Cookie: townvalues_test=$uid; path=$path;
 > expires=$expDate; domain=$domain";
 > print $cookie_string,"\n";



When searching the cookie list for valid cookies, a comparison of the 
domain attributes of the cookie is made with the Internet domain name of 
the host from which the URL will be fetched. If there is a tail match, then 
the cookie will go through path matching to see if it should be sent. "Tail 
matching" means that domain attribute is matched against the tail of the 
fully qualified domain name of the host. A domain attribute of "acme.com" 
would match host names "anvil.acme.com" as well as "shipping.crate.acme.com".

Based upon the above, just change:

$domain = ".townvalues.com";


$domain = "townvalues.com";

Anthony Baratta
Keyboard Jockeys

More information about the thelist mailing list