Need a simple script which can take a text file that consists of a list of image URLs, and saves those URLs to a directory on my server. Needs this done quickly and cheaply. Must accept Paypal. Contact me with a quote.. JOB IS FINISHED. THNX.
Hi if I can understand you correctly your needing to upload the text file of image urls to a database and then save them? or Have I misunderstood.
<?php $file = "file.txt"; $directory = "dir"; set_time_limit(0); $contents = file($file); foreach ($file as $line) { $file_name = strrev($line); $file_name = str_replace(strstr($file_name,"/"),"",$file_name); $file_name = strrev($file_name); if (@copy($line,$directory."/".$file_name)) { echo "File ".$file_name." copied to directory<br> \n"; } else { echo "Failed to copy ".$file_name." to directory<br> \n"; } } ?> PHP: Untested, just wrote this up for you real quick, should work. Just feed the variables with the proper values, run the script, should download all the images in your text file of URLs, and keep orginal filenames.