Re: Copying an image from one server to another
| From: | Chris | Date: | Tue, 05 Feb 2008 22:38:20 +0000 |
| Subject: | Re: Copying an image from one server to another | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-44581@lists.php.net to get a copy of this message | ||
ioannes wrote:
OK but I could execute the script on the target server, which is also mine. So the jpg on the source is actually the remote server, I would be reading a remote file and writing it to the server which is executing the script.OK I guess i completely misunderstood what you were doing then (and I guess everyone else did too :P). easy. $remote_image = file_get_contents('http://domain.com/image.jpg'); file_put_contents('/path/to/image/folder/image.jpg'); or if it's a big image use fopen, fputs, fclose (read the manual for using these). -- Postgresql & php tutorials http://www.designmagick.com/