in reply to Re^3: Help reading cookies
in thread Help reading cookies
local(@getcookies) = split (/; /,$ENV{'HTTP_COOKIE'}); local(%cookies); foreach(@getcookies){ ($ckey, $cval) = split (/=/,$_); $cookies{$ckey} = $cval; } #end foreach(@getcookies) $user_sid = $cookies{'phpbb2mysql_sid'}; $user_logged = $cookies{'phpbb2mysql_data'}; $user_lang = $cookies{'lang'}; if ($user_logged !~ /autologin/) { print "$user_logged"; &error(not_logged); }
That would check the local cookie on that domain before passing back to the www.mymaindomain/cgi-bin/comments.pl script again. Shouldn't that work?
My only problem now is, how do I pass it off? I have a require line in the comments.pl that takes it to the check-cookie.pl script at myfirstdomain.com, but it doesn't read the cookie.
|
|---|