Page 1 of 1

Call to undefined function: curl_init()

Posted: Tue Sep 12, 2006 1:58 pm
by NVPack
When I try to run the following code, I get the following error:

Code: Select all

<!doctype html public "-//W3C//DTD HTML 4.0 //EN"> 
<html>
<head>
       <title>Title here!</title>
</head>
<body>
 <p><big>This is my Default Home Page -- index.html ... </big></p>
<?
  phpinfo();
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://espn.go.com/");
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_exec($ch);
curl_close($ch);

?>
</body>
</html>
Fatal Error: Call to undefined function: curl_init() in - on line 10
It appears to want me to define curl_init(). But, I thought I did that. I was following the code example from the php.net website on using the curl_init function. http://us2.php.net/manual/en/function.curl-init.php The website I used (ESPN) is just an example. What I am trying to do should be able to bring up any website, right? Doesn't matter if it's a php site or not, does it? I'm very new to php, so any suggestions would be helpful. Thanks!

Posted: Tue Sep 12, 2006 2:02 pm
by Luke
it means you don't have curl intalled

Thanks

Posted: Tue Sep 12, 2006 3:14 pm
by NVPack
The Ninja Space Goat wrote:it means you don't have curl intalled

Ok thanks. I am now in the process of installing/configuring curl as I speak. Hopefully I am doing it right and all will be good when it's finished.