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

curl-and-php

redirect troubles...

From: Ace Mc Kool <motorpsychkill_at_hotmail.com>
Date: Tue, 20 Jan 2004 18:35:47 +0000

Hello,

I'm trying to redirect my customers to the actual Paypal page (where the URL
in the browser reflects the Paypal page) rather than just executing my cURL
function (where the browser URL shows my domain, not Paypal's).

For e.g., this is what I want to happen (but without the GET parameters
visible in the URL:

http://www.liquidphire.com/test.php?mode=header

This is what I have this so far (see actual code below):

http://www.liquidphire.com/test.php?mode=curl

You will notice that I get the Paypal page but all the image links are
broken (because Paypal uses relative URL's in it's HTML).

<code>
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL,"$url");
        curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLOPT_POST, 1);
        curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER["HTTP_USER_AGENT"]);
        curl_setopt($ch, CURLOPT_REFERRER, "$from");
        curl_setopt($ch, CURLOPT_POSTFIELDS, "$string1");
        curl_setopt($ch, CURLOPT_VERBOSE, 0);
        curl_setopt($ch, CURLOPT_HEADER, 0);

        $data = curl_exec ($ch);
        curl_close ($ch);

        echo $data;
</code>

Any ideas on how to do a physical redirect within cURL? Thank you very much
for any help!

-m

_________________________________________________________________
Rethink your business approach for the new year with the helpful tips here.
http://special.msn.com/bcentral/prep04.armx

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
Received on 2004-01-20