Call to undefined function: curl_init()

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
NVPack
Forum Newbie
Posts: 4
Joined: Tue Sep 12, 2006 1:41 pm

Call to undefined function: curl_init()

Post 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!
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

it means you don't have curl intalled
NVPack
Forum Newbie
Posts: 4
Joined: Tue Sep 12, 2006 1:41 pm

Thanks

Post 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.
Post Reply