Re: Upload to a diferent site

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

 



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
20040122164057.40959.qmail@pb1.pair.com">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

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


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux