Ey buddy, I think you can manipulate the cookies using the http headers...
You can read the header, looking for the set-cookie statements (keep it a variable or file) and then send it to the web using the cookie statement...
This link probably will help you:
http://curl.haxx.se/rfc/cookie_spec.html
Header Examples:
HTTP/1.1 200 OK
Cache-Control: private, no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Expires: Sat, 01 Jan 2000 00:00:00 GMT
P3P: CP="DSP LAW"
Pragma: no-cache
Set-Cookie: reg_fb_ref=http%3A%2F%2Fwww.facebook.com%2F; path=/; domain=.facebook.com
Set-Cookie: test_cookie=1; path=/; domain=.facebook.com
Content-Encoding: gzip
Content-Type: text/html; charset=utf-8
X-Cnection: close
Date: Fri, 02 Apr 2010 17:52:43 GMT
Content-Length: 7924
GET *some url* HTTP/1.1
Host: *some host*
User-Agent: *some agent*
Referer: *some referrer*
Cookie: *Cookie data*
DerBen wrote:
Ok to start, I really like this..
However I can't seem to figure out how to add a cookies tag to the header.
This is roughly what I need to simulate:
###
GET *some url* HTTP/1.1
Host: *some host*
User-Agent: *some agent*
Referer: *some referrer*
Cookie: *Cookie data*
###
This is the code I'm using:
headers := "Cookie: stuff"
length := httpQuery(data:="",URL,"",headers)
Other values seem to get passed except "Cookies:". So am I missing something? The inserted header doesn't end up on the bottom either, not sure if that would make a difference or not.