Re: Copying an image from one server to another

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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/

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux