Jump to content

creating a jpeg ressource with cURL.


Evank_Horizon

Recommended Posts

How do I do it? My server disables fopen() to download from anything http. I figured cURL could do it but so far I had no luck making it work. imagick does not recognize it as a jpeg stream.

 

        $ch = curl_init($adress);
        curl_setopt($ch, CURLOPT_FAILONERROR, 1);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLOPT_BINARYTRANSFER, 1);
        curl_setopt($ch, CURLOPT_MUTE, 1);
        $handle = curl_exec($ch);
        curl_close($ch);

Link to comment
https://forums.phpfreaks.com/topic/167326-creating-a-jpeg-ressource-with-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.