Jump to content

error in curl


arlabbafi

Recommended Posts

i use this code

function LoadImageCURL($save_to)
{
$ch = curl_init($this->source);
$fp = fopen($save_to, "wb");

// set URL and other appropriate options
$options = array(CURLOPT_FILE => $fp,
                 CURLOPT_HEADER => 0,
                 CURLOPT_FOLLOWLOCATION => 1,
             CURLOPT_TIMEOUT => 60); // 1 minute timeout (should be enough)

curl_setopt_array($ch, $options);

$save = curl_exec($ch);
curl_close($ch);
fclose($fp);

return $save;
}

appear this error:Fatal error: Call to undefined function curl_init() in C:\xampp\htdocs\get_image\class.get.image.php on line 111

Why ???

Link to comment
https://forums.phpfreaks.com/topic/159603-error-in-curl/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.