hello there!
I have to get the data from page, what requires a login (session).
so, first i have simulate login in page
www.someweb.com?user=xxx&pass=xxx
and now access to protected area:
www.someweb.com/members/data.php
i know username and password and i do like this:
$fp = fsockopen ("www.somepage.com", 80, $errno, $errstr, 30);
if (!$fp) {
echo "$errstr ($errno)<br>\n";
} else {
fputs ($fp, "HEAD /members/report.asp?param1=xxx¶m2=xxx&etc=1 HTTP/1.0\r\n\r\n");
while (!feof($fp)) {
$header2 .= fgets ($fp,128);
}
fclose ($fp);
}
now i analyze the header, and it looks something like that:
Set-Cookie: cjsession=454086x2x416789x1x2x2761669; path=/
Set-Cookie: upass=xxx; path=/
Set-Cookie: uname=xxx; path=/
Set-Cookie: ASPSESSIONIDQQQQQQCQ=KBJHGNIDJMKPJAICMBNOANCL; path=/
Cache-control: private
but i am not sure what to do next ... header posting, setting cookies manually, nothing doesnt seem to work. i have tried like 4 days to find the solution ... so, if anyone knows, i thank you for reply!