LanceT Posted January 14, 2007 Share Posted January 14, 2007 Hi, how do I use PHP to upload an image from an external source (ex - imageshack.us) and copy it onto my own server? Link to comment https://forums.phpfreaks.com/topic/34148-uploading-by-url/ Share on other sites More sharing options...
Orio Posted January 14, 2007 Share Posted January 14, 2007 If you are running PHP 4.3.0 or greater, and you have allow_url_fopen enabled, you can simple use the copy() function:[code]copy("http://imageshack.us/pic.jpg", "picture_name.jpg");[/code]Orio Link to comment https://forums.phpfreaks.com/topic/34148-uploading-by-url/#findComment-160665 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.