Hi,
I'm looking to login to a page on another website and fill in a form protected by that login. I have the username/password, and I can successfully request the login page, receive cookies and handle redirects. My problem is that the login is based on a cookie stored on the user's machine. I can figure out how to interpret the cookie that the server sends me, but I can't figure how to send it back to the server on the next page. I could transmit the variable as a GET or POST variable, but I think they have a control on it, so it will only take a cookie.
btw, I'm accessing the other site with:
$fp = fsockopen ($host, 80, $errno, $errstr, 30);
fputs($fp,$header);
while (!feof($fp))
$buffer .= fgets($fp, 4096);
$breakPt = strpos($buffer, "\r\n\r\n", 0);
$header = substr($buffer, 0, $breakPt );
$body = substr($buffer, $breakPt + 4);
Does that seem to be the right way to go about it?
Any help is appreciated.
Thanks,
Carver