Re: Copying an image from one server to another
| From: | ioannes | Date: | Tue, 05 Feb 2008 14:49:06 +0000 |
| Subject: | Re: Copying an image from one server to another | ||
| References: | 1 2 3 4 5 6 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-44573@lists.php.net to get a copy of this message | ||
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.
Chris wrote:
ioannes wrote:This is too advanced for me and having spent several hours reading I am no wiser. Given that I understand cURL and uploading files is possible - http://us3.php.net/features.file-upload - it should be just a matter of referencing a .jpg using a URL into a variable and uploading it to the target server, but from a script rather than a web form. Would file() work as the documentation seems to refer to text files that are read line by line. http://us3.php.net/manual/en/function.file.phpYou cannot use file or fputs to WRITE to a url or remote server. You will have to find another way (one being ftp: http://www.php.net/ftp).