I would like to send few cookies with my GET or POST request.
Currently what i do is:
$url="http://www.fbi.gov/fun-games/"; //worth visiting :)
$arguments[Headers]["Cookie"]="mycookie=bla bla bla; myothercookie=talking about the revolution; mylastcookie=i am the most delicious cookie here"
.......more code here.....
So i actually set the cookies manually by declaring them in the Request headers.
is there a better way to do it? Is there a method for that?
Also, i could not find any info about the methods of the class. Could be great if someone case explain:
SetCookie($name, $value, $expires="" , $path="/" , $domain="" , $secure=0, $verbatim=0)
SaveCookies(&$cookies, $domain='', $secure_only=0, $persistent_only=0)
SavePersistentCookies(&$cookies, $domain='', $secure_only=0)
GetPersistentCookies(&$cookies, $domain='', $secure_only=0)
Temel Nazli - 2011-02-25 08:48:00 - In reply to message 2 from Manuel Lemos
It is a bit odd - SetCookie function take arguments that are not related to its purpose.
If i understand right, SetCookie function purpose is to add a cookie to the GET or POST request that is about to be sent.
When you send a cookie with your request you do not need to specify any domain, exp. time or path - those values are not sent with the cookie, they are needed only for the client (browser).
Can you please write a very short description for each function that i mentioned?
Thank you once again for sharing the class and for supporting it.