Skip to content
⌘ NSIS Forum Archive

InterenetSetCookie function

2 posts

Action#

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['softwareinstalled'] == 'true' ) 
  {   echo "<b>Software has been successfully installed.</b>\n"; }
  else
  {  echo "<b>To Access our Lobbies, Please Download our <br><a href='http://www.rengamesonline.com/modules.php?name=Software'>Renaissance Games Software</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.
Action#
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