Re: Upload to a diferent site
| From: | Anthony | Date: | Thu, 22 Jan 2004 16:46:04 +0000 |
| Subject: | Re: Upload to a diferent site | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-22646@lists.php.net to get a copy of this message | ||
Yup, from the PHP docs: "Note: As of PHP 4.3.0, both source and dest may be
URLs if the "fopen wrappers" have been enabled. See fopen() for more
details. If dest is an URL, the copy operation may fail if the wrapper does
not support overwriting of existing files. "
You'll need to ensure you can access the remote server with the correct
permisions though.
- Anthony
"Manuel Couto" <manuel.couto@renova.pt> wrote in message
news:20040122164057.40959.qmail@pb1.pair.com...
> does any one know if is possible to upload an image to a diferent site
from
> the one where the PHP script is running?
>
> something like this:
>
> Im running this script from "site1"
>
> $users_file="image1.jpg";
> $copy_path="www.site2.com/images";
>
> if(!copy($users_file, $copy_path)) {
> echo "<font face=\"Arial\">A imagem não foi
> publicada!</font>";
> }
>
> Is this operation possible in PHP?
> Could anyone help me please?
>
> Tanks in advance
> Manuel