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

curl-and-php

RE: problem while redirecting with curl to an https

From: Lizet Peņa de Sola <lizet_at_krosslink.com>
Date: Thu, 6 May 2004 08:50:57 -0500

Hello, thanks for your reply.
Yes, I request the page with curl and display it, my site is http but
the page I request is https in some other domain.

$url="https://www.foo.com" //https' site uri
$ch= curl_init();
curl_setopt($ch, CURLOPT_URL, $url);

I'll try sending the proper headers now.
Lizet

On Wed, 5 May 2004, Lizet Peņa de Sola wrote:

> I'm trying to send a post request to a https uri with curl, everything

> works except that the browser never shows the new https url that I'm
> redirecting the browser to

I'm sorry, but you are saying that you request a page with curl and you
display it? Is your site HTTP or HTTPS? How are you redirecting the
browser to what https page?

> not the lock image on the status bar

If your site is HTTP only it shouldn't be there. If its HTTPS it should
be there. Not curl nor PHP can change that.

> the url that is shown is the one of the page making the request.

Of course. That is the page the browser is watching. It has no idea how
you get the HTML you send back to it. If you want it to change to a
differerent URL, you need to pass on the standard headers that makes it
move.

-- 
     Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
      Dedicated custom curl help for hire: http://haxx.se/curl.html
Received on 2004-05-06