cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Re: Problem with redirection

From: Richard Lynch <ceo_at_l-i-e.com>
Date: Tue, 1 Jan 2008 12:36:13 -0600 (CST)

On Mon, December 17, 2007 9:34 am, Werner Hofer wrote:
> I would like to use the curl library. I wish to get a content from a
> page
> (page x: http://www.travelan.net/module/20316/more-gesamt/).
> For that i call a page (page y:
> http://www.getyourstock.com/alfa13.php) and
> this page calls page x (see the example alfa13.php).
> Now the problem is following: There is an redirection whitin page x
> and i do
> not know how to get the content of the redirected page x
> The content of the redirected page x should be displayed finally in
> the
> browser.
> Result: I only get the header, but not the content of the page
> itselfs.
>
> The header i get is following:
>
> HTTP/1.1 302 Found Date: Mon, 17 Dec 2007 15:20:17 GMT Server:
> Apache/2.0.54
> (Debian GNU/Linux) PHP/5.2.3 with Suhosin-Patch DAV/2 mod_ssl/2.0.54
> OpenSSL/0.9.7e X-Powered-By: PHP/5.2.3 Set-Cookie:
> PHPSESSID=1vmqk1rfjgau42pvki54kl8je5; path=/ 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 location:
> http://www.holidayandmore.de/index.asp?Agentur=50376&AgentID=20316
> Transfer-Encoding: chunked Content-Type: text/html

Since you are getting cookies in the headers, perhaps you need to
provide a COOKIEJAR and COOKIEFILE for the redirects to work.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/from/lynch
Yeah, I get a buck. So?
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2008-01-01