Re: getting content with fput, SESSIONS and frames

From: Date: Mon, 26 Jan 2004 16:20:52 +0000
Subject: Re: getting content with fput, SESSIONS and frames
Groups: php.general 
Request: Send a blank email to php-general+get-175771@lists.php.net to get a copy of this message
<snip> 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? </snip> take a look at regular expressions, or you could use substr http://www.php.net/substr and strpos http://www.php.net/manual/en/function.strpos.php to extract the location. once you get http://domain.tld/c17c340a3e6a2cb268451f3eda5930ce/frameset.php?q=string into a $var, you could use explode to get this into an array or substr and strpos again to get the session id. I am assuming that c17c340a3e6a2cb268451f3eda5930ce is the session id in your example. these are just a couple I could think of, I am sure there are more ways.

« previous php.general (#175771) next »