iam getting error for both the scripts
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://google.com/");
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_exec($ch);
curl_close($ch);
?>
whn iam using this script iam getting an error
Call to undefined function curl_init() in C:\wamp\www\pdf\text.php on line 2
---------------------------------------------------------------------------------------
<?php
$file_contents = file_get_contents('http://example.com/');
// display file
echo $file_contents;
?>
----------------------------------------------------------
Warning: file_get_contents() [function.file-get-contents]: php_network_getaddresses: getaddrinfo failed: No such host is known. in C:\wamp\www\pdf\text.php on line 2
Warning: file_get_contents(http://example.com/) [function.file-get-contents]: failed to open stream: php_network_getaddresses: getaddrinfo failed: No such host is known. in C:\wamp\www\pdf\text.php on line 2
-------------------------------------------------------------
allow_url_fopen is "on" in my phpinfo()
allow_url_include is "off" in my phpinfo()
or if u have any other that scripts tht works plz let me know



Reply With Quote


Bookmarks