Buying Simple PHP script needed immediately.

Discussion in 'Programming' started by LordXenu, Dec 7, 2009.

  1. #1
    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.
     
    Last edited: Dec 7, 2009
    LordXenu, Dec 7, 2009 IP
  2. Technovice

    Technovice Peon

    Messages:
    102
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #2
    hello, I am available...
     
    Technovice, Dec 7, 2009 IP
  3. deang

    deang Guest

    Messages:
    32
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #3
    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.
     
    deang, Dec 8, 2009 IP
  4. phprightnow

    phprightnow Peon

    Messages:
    296
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #4
    <?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.
     
    phprightnow, Dec 9, 2009 IP