Save any image from url using php
Join the DZone community and get the full member experience.Join For Free
The above code snippet saves image from url into our local file system.
imagecreatefromjpeg function is used for creating an image from file or URL
Also allow_url_fopen setting must be set to On in php.ini file for creating image resource from URL
For more details please refer the documentation mentioned in below url
Opinions expressed by DZone contributors are their own.