[Plugin: Flickr Shortcode Importer] file_get_contents with url ISP does not support
-
Hi
My isp does not allow file_get_contents to use urls, only local files. I replaced the call with a curl equivalent function (shown below). But then I got
{“error”:””About” Post ID 24 failed to be processed. The error message was: Unknown failure reason.”}
I’m using WordPress 3.3.2. PHP Version 5.2.17.
I’ll try and figure out what is going on but using curl might be a good addition for the next update anyway.
~Toby
function file_get_contents_curl($url) {
$ch = curl_init();curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, $url);$data = curl_exec($ch);
curl_close($ch);return $data;
}https://www.ads-software.com/extend/plugins/flickr-shortcode-importer/
- The topic ‘[Plugin: Flickr Shortcode Importer] file_get_contents with url ISP does not support’ is closed to new replies.