Archive: InterenetSetCookie function


InterenetSetCookie function
Something is wrong with this function. It simply does not work. I have copy pasted everything from the example page and changed the domain.com to mine and updated the expire time.
When i check my cookies it shows softwareinstalled = true

but when I use:

if($_COOKIE***91;'softwareinstalled'***93;=='true')

{echo
"<b>Softwarehasbeensuccessfullyinstalled.</b>\n";}
else
{echo
"<b>ToAccessourLobbies,PleaseDownloadour<br><ahref='http://www.rengamesonline.com/modules.php?name=Software'>RenaissanceGamesSoftware</a>.</b>\n";}
It still tells me to install software.

My opinion is something is wrong with the way its saving the softwareinstalled = true .... dont think that "=" is suppose to be in the cookie. softwareinstalled is the cookiename and true is the value. Not sure where the = comes into play.

I found the problem and its the code being posted.

System::Call "wininet::InternetSetCookie(t,t,t) (t'http://www.domain.com', t'', \
t'softwareinstalled = true; expires = Fri, 31-Dec-2004 00:00:00 GMT')"

is incorrect.... it should be

System::Call "wininet::InternetSetCookie(t,t,t) (t'http://www.domain.com', t'softwareinstalled', \
t'true; expires = Fri, 31-Dec-2004 00:00:00 GMT')"

might want to update your page example