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

curl-and-php

I am unable to fetch page using

From: One Rover <onerover_at_gmail.com>
Date: Sat, 3 Nov 2007 22:48:22 +0530

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
Received on 2007-11-03