in reply to Re: Perl and cookies...
in thread Perl and cookies...

Ok, No, they are all different domains.

So I guess I'm SOL :o{

I wonder how Microsoft Passport does it...

Oh well, that's another topic ;o}

thx,
Richard

Replies are listed 'Best First'.
Re: Re: Re: Perl and cookies...
by cfreak (Chaplain) on Feb 24, 2003 at 15:15 UTC
    MS passport loads an image from passport.msn.com and then they just put that image on every page that there is a passport login. So you could do it that way: something like:
    <img src="http://yourdomain.com/setcookie.cgi" alt="" /> you just need to make your 'setcookie.cgi' header send the cookie you want to set and then tell it to print the location of an image. Something like this: (untested)
    #!/usr/bin/perl -T use strict; use warnings; use CGI; my $cgi = new CGI; my $cookie = $cgi->cookie(-name =>'somename', -value =>'somevalue', -path =>'/', -expires=>'+10y', #long cookie -domain =>'yourdomain.com', ); print $cgi->redirect( -cookie=>$cookie, -uri =>'http://yourdomain.com/someimage.png');

    The only caveat is that some ad-blocking software blocks this as it is normally used to track people. This is especially true if you make the image a 1x1 transparent GIF. But if you aren't worried about that this should be the solution you are looking for.

    Hope that helps
    Chris

    Lobster Aliens Are attacking the world!