I'm wondering if it's possible to generate a cookie and save it in a text file. The requirement is to generate a cookie for any domain not only that you own. After all the cookies are plain text but the "space" and path ("/") seems to make it a bit tricky to reproduce using manual programming (e.g not setcookie function ). Netscape seems to help but not I can't find a proof of concept shell/application to actually generate the cookie (not to get/receive/read it as curl does) http://curl.haxx.se/rfc/cookie_spec.html Basically I'm looking for a code snippet to see how this black magic works because I don't understand the spaces between the parameters . So far I identified the parameters required to generate a "valid" cookie .
Name
Content
Host
Path
Secure(true or false)
HTTP only(true or false)
Expires(optional)
Of course it is possible, all the major browser software does it.
Update:
cUrl apparently uses the Mozilla/Firefox cookie format for permanent (not session) cookies. Here is a good blog article describing that format. Writing it should be simply a matter of writing a text file in this format.