Re: Copying an image from one server to another
| From: | Chris | Date: | Mon, 04 Feb 2008 04:03:25 +0000 |
| Subject: | Re: Copying an image from one server to another | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-44562@lists.php.net to get a copy of this message | ||
ioannes wrote:
I am trying to: - check whether an image file exists on a server, - check whether it does not exist on another server, and if not exists - to copy from the first location to the second. I am using cURL. First step to capture the image from the first server. When I return this image to the browser I get a lot of strange characters. So has this captured the image and what do I use next to upload to the second server? I was trying to use file_exists and had problems referencing the file location as "http://wwww.mysite.com/pic.jpg". But I know I can also look at using readfile() and file_put_contents(), $fp = fopen(), fputs(), fpassthru() etc. What is best way?FTP. There's no way fopen is going to be able to write to a remote url, that'd just be such a huge security issue it's not funny. -- Postgresql & php tutorials http://www.designmagick.com/