Forum


Replies: 9   Views: 4513
Cannot find image
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by admin  · 11-09-2014 - 15:18

Hello, The best approach could be to get the image using curl and then add it as any other image. This is get it, save to the disk and add it. You can get the image using curl using a code like: $ch = curl_init ($imageUrl); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_BINARYTRANSFER,1); $raw = curl_exec($ch); $fp = fopen($pathImage,'x'); fwrite($fp, $raw); fclose($fp); Regards.