getting content with fput, SESSIONS and frames
| From: | Jack Bauer | Date: | Mon, 26 Jan 2004 15:56:04 +0000 |
| Subject: | getting content with fput, SESSIONS and frames | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-175765@lists.php.net to get a copy of this message | ||
Hi Guys,
i wanna get some content from an other website with a sessionid and a
frameset.
my starting code looks like this:
<?PHP
$fp = @fopen("http://domain.tld/frameset.php?q=string",
"r");
if($fp){
while($in = fread($fp, 1024))
$reply .= $in;
echo ("$fp\n\n");
echo ("$reply\n\n");
fclose($fp);
}
?>
now i got in $replay a frameset that links to the main.php without the
session id.
the paket header including the forward looks like this:
HTTP/1.1 302 Found
Date: Mon, 26 Jan 2004 11:38:51 GMT
Server: Apache
X-Powered-By: PHP/4.3.1
Location:
http://domain.tld/c17c340a3e6a2cb268451f3eda5930ce/frameset.php?q=string
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0,
pre-check=0
Pragma: no-cache
Connection: close
Content-Type: text/html
now i'm looking for a method to get the location into a $var to extract the
sessionid
any ideas for that?
regards