Hi friends,
<?php
ini_set("display_errors",1);
error_reporting(E_ALL);
$url = "http://www.yahoo.com";
$curl = curl_init($url);
echo $curl;
curl_setopt($curl, CURLOPT_HEADER, FALSE);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, TRUE);
curl_setopt($curl, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
$source = curl_exec($curl);
curl_close ($curl);
echo $source;
?>
In the above code, i didn't get anything as output.
In php ini:
CURL support enabled
CURL Information libcurl/7.15.1 OpenSSL/0.9.8a zlib/1.2.3 libidn/0.6.2
Help me to solve this problem.............