1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Mass generate image url paths???

Discussion in 'Black Hat SEO Tools' started by bdmedia, Apr 13, 2011.

  1. bdmedia

    bdmedia Jr. VIP Jr. VIP Premium Member

    Joined:
    Nov 12, 2008
    Messages:
    306
    Likes Received:
    102
    Location:
    Univerise
    Anyone know of a program i can use to complete this task??

    Basically i have a around 2,000 images on a server which i am trying to generate the full URL path for.

    its one main folder with a number of sub folders... looking for a program which can generate the full image path for all of the images including the sub folder into a txt file... Anyone know of anything which can do this??? or am I better off hiring a programmer? :cool:
     
  2. nme

    nme Junior Member

    Joined:
    Jan 17, 2008
    Messages:
    124
    Likes Received:
    36
    A directory listing, some awk and sed action is about it.
     
  3. dextor1372

    dextor1372 Regular Member

    Joined:
    Oct 4, 2008
    Messages:
    272
    Likes Received:
    274
    Occupation:
    6PS Co - CEO
    Location:
    Manchester, UK
    Home Page:
  4. dextor1372

    dextor1372 Regular Member

    Joined:
    Oct 4, 2008
    Messages:
    272
    Likes Received:
    274
    Occupation:
    6PS Co - CEO
    Location:
    Manchester, UK
    Home Page:
    Quick question...

    Are ALL the images in the SAME sub-folder? or spread into / under multiple sub folders?
     
  5. dextor1372

    dextor1372 Regular Member

    Joined:
    Oct 4, 2008
    Messages:
    272
    Likes Received:
    274
    Occupation:
    6PS Co - CEO
    Location:
    Manchester, UK
    Home Page:
    nvm lol silly me - just re-read your part about multiple sub folders - ignore last post please :p lack of sleep is a killer :p
     
  6. dextor1372

    dextor1372 Regular Member

    Joined:
    Oct 4, 2008
    Messages:
    272
    Likes Received:
    274
    Occupation:
    6PS Co - CEO
    Location:
    Manchester, UK
    Home Page:
    Here is the PHP code you need.

    PHP:
    <?php

    print_r
    (getpathfiles("./"));

    function 
    getpathfiles($dir) {
        
        
    $domain_name "http://www.domain.com"// Do NOT put a forward slash '/' at the end !!!

        
    $ite=new RecursiveDirectoryIterator($dir);
        
    $foo=new RecursiveIteratorIterator($ite);
        
    $ret=array();
        foreach (
    $foo as $path=>$cur) {
            
    $new_path str_replace("./""/"$path);
            echo 
    $domain_name.dirname($new_path)."/".basename($path)."<br>";
        }
        return 
    $ret;
    }

    ?>
    Working example

    http://master.zeuscluster.com/test.php

    I hope this helps.
     
    • Thanks Thanks x 2
  7. bdmedia

    bdmedia Jr. VIP Jr. VIP Premium Member

    Joined:
    Nov 12, 2008
    Messages:
    306
    Likes Received:
    102
    Location:
    Univerise
    Thanks works perfect!
     
  8. dextor1372

    dextor1372 Regular Member

    Joined:
    Oct 4, 2008
    Messages:
    272
    Likes Received:
    274
    Occupation:
    6PS Co - CEO
    Location:
    Manchester, UK
    Home Page:
    Your more than welcome mate. If you need any more just lemme know.

    Cheers
     
  9. websemgem

    websemgem Newbie

    Joined:
    Feb 5, 2011
    Messages:
    20
    Likes Received:
    3
    If you need generate an image sitemap you could use the trial of A1 Sitemap Generator. (If you just want to generate a text file with image paths, you would need tinker with settings a little since the presets do not contain that specific variation.)