1

I need a class like snoopy to post form var and aso allow the code that is called to post to write cookies snoopy works great but the code i am trying to get to work has

$cookie['data'] = serialize (array ($this->username, md5 ($cookie['seed'] . md5 ($this->password))));
     @setcookie ($cookie['name'],
        $cookie['data'],
        $cookie['expire'],
        $cookie['path'],
        $cookie['domain']);

and the cookie never get written the login code work fine by hand but i need a way to login by code any thoughts thank you in advance

thejh
  • 44,854
  • 16
  • 96
  • 107
Robert
  • 11
  • 2

1 Answers1

0

Make sure you're not outputting any text before you call setcookie. Also try taking of the @ so you're not suppressing errors and see if it is erroring out and why. Also check to see if the cookie is being set (livehttpheaders, fiddler, just check the directory where cookies are, etc, etc), and also that its being sent with the request.

profitphp
  • 8,104
  • 2
  • 28
  • 21