PDA

View Full Version : Can I make a php file save images to the server?


wakawaka
03-16-2002, 05:40 PM
I can use this script to show a list of pictures, then i have to save them all by hand then upload them to the server:

<?

for($number = 100; $number <= 150; $number++)
{
echo "<img src=\"http://im.imaginistix.com/imaginistix/web/2008comps/B-$number.jpg\"><br>";
}
?>


can i edit the script to make it save the images to the web server directly? So once i load the file, instead of showing all of the pictures it will just save it to the directory that the script is in?

All advice is appreciated, I need the help badly, I am trying to come up with a massive gallery collection for my site.

and before you ask, the authors of the pictures clearly state on the site, as long as I link to their site they are ok with the use of their pictures.

thx in advnace.

wakawaka
03-16-2002, 08:12 PM
bump bump :)

wakawaka
03-19-2002, 04:19 PM
can anyone at least point me in the right diection?

wakawaka
03-19-2002, 05:01 PM
I used this script a minute ago:

<?

for($number = 10; $number <= 54; $number++)
{
$image = fopen ("http://www.arcticnightfall.com/berserk/pix/episode_01/image00$number.jpg", "r");

copy ($image, $image);
}

?>

and this is all it gave me:

Warning: fopen("http://www.arcticnightfall.com/berserk/pix/episode_01/image0010.jpg","r") - Unknown error in /home2/www/myurl/berserk/test/test.php on line 5

Warning: Unable to open '' for reading: No such file or directory in /home2/www/myurl/berserk/test/test.php on line 7

Warning: fopen("http://www.arcticnightfall.com/berserk/pix/episode_01/image0011.jpg","r") - Unknown error in /home2/www/myurl/berserk/test/test.php on line 5

Warning: Unable to open '' for reading: No such file or directory in /home2/www/myurl/berserk/test/test.php on line 7

wakawaka
03-19-2002, 05:01 PM
well that repeated all the way to image 050.jpog, but i did not need to copy and paste 50 errors