I may misunderstand you but surely the easiest way to copy a file from 
one computer to another is by ftp? Log into a shell on computer 1, ftp 
to computer 2 and transfer whatever files you want. This may be by a 
simple script and does not need php (did I say that?).

On the other hand, php has ftp functions you can use to do it with php 
(assuming you compiled php with ftp).



Lic. Carlos A. Triana Torres wrote:

>Hello all,
>    I am learning php and I am trying to make a very simple script so as to
>download a jpg from one site I manage to another that I also manage. It
>would be, get a jpg from and put in to
> I have tried this, but the only way it
>works is if I give the absolute path to the
>file...($file_name="/usr/local/htdocs/...image.jpg") but how can I make it
>work with the URL?
>    Thanks for your suggestions...
> if(isset($upload)){copy($file, "uploads/$dir/$file_name");  }
><table border="0" width="80%" cellspacing="5" cellpadding="5">
>    <form action="<?=$PHP_SELF;?>" method="post"
>        <tr>
>            <td colspan="2"><input type="hidden" name="max_tam"
>value="100000"><input type="submit" name="upload" value="Upload"></td>
>        </tr>
>    </form>

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to