Re: CURL and $_SESSION problem

From: Phil Powell (soazine_at_erols.com)
Date: 07/10/04


Date: 9 Jul 2004 15:40:28 -0700

Pedro Graca <hexkid@hotpop.com> wrote in message news:<slrnceto97.16d.hexkid@ID-203069.user.uni-berlin.de>...
> Phil Powell wrote:
> > Pedro Graca <hexkid@hotpop.com> wrote in message news:<slrncetaml.16d.hexkid@ID-203069.user.uni-berlin.de>...
> >> If i knew the URLs for your scripts I'd post here the complete output of
> >> them. As it is I'll do a Google transcript :)
> >
> > Sorry I can't give that to you. The URL is under the protection of
> > the US Federal Government, and you know how the government is!
>
> I expected something like that. However *you* can do it!
>
> Have you tried to telnet the scrape.php server?
> See the headers it sends to its clients (and to index.php CURL calls).

Can't do it, connection refused when I attempt to telnet. :(

>
> > Now, here is what I was thinking and hopefully this will be along the
> > lines of what you were trying to suggest:
> >
> > I need to do some kind of polling to the site where "index.php" is and
> > get the cookie that it has over there. Once I get the cookie then I
> > would just reset it back into the HTTP headers when I go get
> > "index.php" again.
> >
> > How on earth do I do that with CURL?
>
> With the appropriate changes to my xx1.php script of a few posts back.

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.

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?
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.

Phil



Relevant Pages

  • Re: CURL and $_SESSION problem
    ... >> the US Federal Government, and you know how the government is! ... > See the headers it sends to its clients (and to index.php CURL calls). ... Once I get the cookie then I ... I can get my own PHPSESSID but I can't get the REMOTE ...
    (alt.php)
  • Re: [PHP] url rewriting within sessions - confused newbie needs h elp
    ... The first time I load the page, I assume the session is created by ... and the cookie is sent to the browser. ... including a header to set the PHPSESSID cookie; ...
    (php.general)
  • Re: Automatic login to a web page
    ... This is mentioned in my isp login page "Cookies must be enabled" ... And with third example [using Curl] ... sub body_callb { ... If it sets a cookie, Curl can handle that too, but it gets more ...
    (comp.lang.perl.misc)
  • Re: [PHP] Help with CURL please
    ... I'm trying to access this URL using CURL and grab ... Now the problem is that in order to access that site, a Cookie must be ... redirects you to http://enterprisedirectory.ucr.edu, sets the cookie ... http://enterprisedirectory.ucr.edu (thus leaving my script) and then ...
    (php.general)
  • Re: Help to automatically traverse a login session
    ... Session and/or Cookie. ... Within this logged-in area, there are links ... Such "web scraping" can be done with cURL ... <?php echo 'Just another PHP saint'; ...
    (comp.lang.php)