Luego de buscar en diversos repositorios y sitios de internet finalmente encontramos la resolución que te compartimos pronto.
Ejemplo: php guardar imagen de url a carpeta
You should be able to usefile_get_contentsfor this one. In order to useanURL with file_get_contents make sure allow_url_fopen is enabled in you php.ini file.define('DIRECTORY','/home/user/uploads');$content=file_get_contents('http://anothersite/images/goods.jpg');file_put_contents(DIRECTORY.'/image.jpg',$content);
Make sure that you have write permission to the directory where you want to store the image; to make the folder writable you could dothis:
chmod +w /home/users/uploads
Reseñas y calificaciones
¡Haz clic para puntuar esta entrada!
(Votos: 0 Promedio: 0)