arlabbafi Posted May 25, 2009 Share Posted May 25, 2009 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 ??? Quote Link to comment https://forums.phpfreaks.com/topic/159603-error-in-curl/ Share on other sites More sharing options...
Dathremar Posted May 25, 2009 Share Posted May 25, 2009 curl is a library that needs to be included into PhP. Check Your php.ini if the libratry is included Quote Link to comment https://forums.phpfreaks.com/topic/159603-error-in-curl/#findComment-841813 Share on other sites More sharing options...
arlabbafi Posted May 25, 2009 Author Share Posted May 25, 2009 how? Quote Link to comment https://forums.phpfreaks.com/topic/159603-error-in-curl/#findComment-841818 Share on other sites More sharing options...
Dathremar Posted May 26, 2009 Share Posted May 26, 2009 Create a php file with this code: <? phpinfo(); ?> And then open it in a browser and search for CURL. Quote Link to comment https://forums.phpfreaks.com/topic/159603-error-in-curl/#findComment-842106 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.