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 http://www.first_site.com/image.jpg and put in to http://www.second_site.com/image.jpg. 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...
<? $file_name="http://www.first_site.com/image.jpg" if(isset($upload)){copy($file, "uploads/$dir/$file_name"); } ?> <table border="0" width="80%" cellspacing="5" cellpadding="5"> <form action="<?=$PHP_SELF;?>" method="post" enctype="multipart/form-data"> <tr> <td colspan="2"><input type="hidden" name="max_tam" value="100000"><input type="submit" name="upload" value="Upload"></td> </tr> </form> </table> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php