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

curl-and-php

Re: I am unable to fetch page using

From: <simon_at_ice.org>
Date: Sat, 03 Nov 2007 18:22:09 +0100

Check out -
http://www.php.net/curl

and look specifically for help on https :)

One Rover wrote:
> This is my simple cURL/PHP code.
>
> <?php
> $url = 'https://login.yahoo.com/config/login';
> $ch = curl_init("$url");
> $fp = fopen("example_homepage.txt", "w");
>
> curl_setopt($ch, CURLOPT_FILE, $fp);
> curl_setopt($ch, CURLOPT_HEADER, 1);
>
> curl_exec($ch);
> curl_close($ch);
> fclose($fp);
> ?>
>
> I am able to fetch the page when $url = ' http://www.example.com/';
> but this code does not work when
> $url='https://login.yahoo.com/config/login'. When I type '
> https://login.yahoo.com/config/login' in browser, the page is
> displayed (even when cookie and javascript disabled). Can anybody
> point out what is wrong in my code?
>
> Thank you.
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
>
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2007-11-03