Re: Any ideas how to read a url that's changed by the server?
- From: Rik <luiheidsgoeroe@xxxxxxxxxxx>
- Date: Mon, 20 Aug 2007 23:12:44 +0200
On Mon, 20 Aug 2007 22:57:01 +0200, TechieGrl <cschaller@xxxxxxxxx> wrote:
You should then be able to extract the session ID from that using your choice
of text matching function.
Now that I've extracted the unique key from the url, I'm finding that
I'm having problems opening up the actual pages. This unique key
appears to be their session variable and so now their server views the
first hit to the server as sesson 1 and assigns it an id. Then when I
send in a new url with the session id, it views it as being a new
session and so that unique session id is no longer valid.
Any thoughts?
Probably you need to use cookies.
<http://nl3.php.net/manual/en/function.curl-setopt.php>
//create sort of 'anonymous' cookiefile in temporary directory
$cookiefile = tempnam();
//initiliaze curl
$c = curl_init();
//follow redirects
curl_setopt($c,CURLOPT_FOLLOWLOCATION,true);
//store & retrieve cookies
curl_setopt($c,CURLOPT_COOKIEFILE,$cookiefile);
curl_setopt($c,CURLOPT_COOKIEJAR,$cookiefile);
//some people still think referrer should be checked, hidious:
curl_setopt($c,CURLOPT_AUTOREFERER,true);
//set the url
curl_setopt($c, CURLOPT_URL, "http://www.example.com/");
//and go:
curl_exec($c);
//and close
curl_close($c);
//and delete cookiefile
unlink($cookiefile);
--
Rik Wasmus
.
- Follow-Ups:
- Re: Any ideas how to read a url that's changed by the server?
- From: TechieGrl
- Re: Any ideas how to read a url that's changed by the server?
- References:
- Any ideas how to read a url that's changed by the server?
- From: TechieGrl
- Re: Any ideas how to read a url that's changed by the server?
- From: Andy Hassall
- Re: Any ideas how to read a url that's changed by the server?
- From: TechieGrl
- Any ideas how to read a url that's changed by the server?
- Prev by Date: Re: Command line output bypasses my capture!
- Next by Date: Best Way to Combine Results from 2 mySQL Searches, into One Sorted List?
- Previous by thread: Re: Any ideas how to read a url that's changed by the server?
- Next by thread: Re: Any ideas how to read a url that's changed by the server?
- Index(es):
Relevant Pages
|
|