Re: CURL and $_SESSION problem
From: Pedro Graca (hexkid_at_hotpop.com)
Date: 07/10/04
- Previous message: Manuel Lemos: "Re: html e-mail seding problem with php..."
- In reply to: Phil Powell: "Re: CURL and $_SESSION problem"
- Next in thread: Phil Powell: "Re: CURL and $_SESSION problem"
- Reply: Phil Powell: "Re: CURL and $_SESSION problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 10 Jul 2004 01:25:43 GMT
Phil Powell wrote:
> Pedro Graca
>> Have you tried to telnet the scrape.php server?
> Can't do it, connection refused when I attempt to telnet. :(
telnet <server> <port>
If you don't specify the port, it'll default to port 23, which probably
is closed by the firewall.
If Mozilla can do it, so can you with telnet!
telnet www.myotherphpwebsite.com 80
telnet www.google.com 80 ==> sets cookie, large HTML
telnet www.barclay.com 80 ==> no cookie, small HTML
but maybe your telnet does not echo commands. If after you enter telnet
nothing shows up type (blindly) "GET / HTTP/1.0<ENTER><ENTER>"
> That still is not going to work. Because I would need to set-cookie
> the PHPSESSID id generated by "index.php" 's server
> ('www.myotherphpwebsite.com'), which I can't retrieve because it
> simply won't let me do so via telnet.
The cookie keeps changing ... for every new connection that doesn't
carry the old cookie, the server will generate a new one.
> Again, I can get my own PHPSESSID but I can't get the REMOTE
> PHPSESSID, and, even if I could do that:
>
> 1) Where will it go using CURL?
Let's assume you got the cookie and have it saved in $scraped_cookie.
Precede next curl_exec() call with
curl_setopt($ch, CURLOPT_COOKIE, $scraped_cookie);
This $scraped_cookie will be something like
"PHPSESSID=0123456789abcdeffedcba9876543210"
(without the quotes, of course), with no spaces before or after, with no
semi-colons anywhere, with no line breaks.
> 2) If I put it with the rest of the cookie stuff to go via
> CURLOPT_COOKIE, again, Mozilla Firefox will lock up and produce a
> page-download infinite loop every time I tried even forcing $PHPSESSID
> into the cookie "query string" that is to be placed into the CURL
> resource HTTP header.
It shouldn't. Maybe you have an infinite loop in your script.
-- USENET would be a better place if everybody read: | to email me: use | http://www.catb.org/~esr/faqs/smart-questions.html | my name in "To:" | http://www.netmeister.org/news/learn2quote2.html | header, textonly | http://www.expita.com/nomime.html | no attachments. |
- Previous message: Manuel Lemos: "Re: html e-mail seding problem with php..."
- In reply to: Phil Powell: "Re: CURL and $_SESSION problem"
- Next in thread: Phil Powell: "Re: CURL and $_SESSION problem"
- Reply: Phil Powell: "Re: CURL and $_SESSION problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|