Wanted: hof_furni downloader (full directory structure)

Results 1 to 6 of 6
  1. #1
    Proficient Member prodigy007 is offline
    MemberRank
    Feb 2013 Join Date
    MissouriLocation
    177Posts

    Wanted: hof_furni downloader (full directory structure)

    I am in need of a simple file downloader that will find and save all swf's: %revision%/%typeid%.swf in their respective directories. I know I can use the cheesy way to just live with placing them all in one directory and I have that, but it would be nice to have the full structure on my server so I can do it all properly.

    If your up to the test and want some google wallet cash, show me what you may have come up with or be nice and point me in the right direction if there is one out there already.

    Sincerely,
    ICUH.


  2. #2
    i am a person Riley H is offline
    MemberRank
    Mar 2010 Join Date
    United StatesLocation
    203Posts

    Re: Wanted: hof_furni downloader (full directory structure)

    Why not just download an SWF pack and place them in htdocs? If not you're just going to have to move the files by hand and create the directories yourself.

  3. #3
    Proficient Member prodigy007 is offline
    MemberRank
    Feb 2013 Join Date
    MissouriLocation
    177Posts

    Re: Wanted: hof_furni downloader (full directory structure)

    No swf pack I have found on the entire forum has them all separated into most folders they should be in. I have about 13 or so directories, that's not even half of what I should have. Most people just use the main dir, not the revision dirs. since no one has all of them. It cant be hard im just too lazy. using the furnidata.txt file it can be done.

  4. #4
    Check http://arcturus.pw The General is offline
    DeveloperRank
    Aug 2011 Join Date
    7,610Posts

    Re: Wanted: hof_furni downloader (full directory structure)

    Write yourself a php rip script :-)
    I'll make you one when I get back from school.

  5. #5
    Proficient Member prodigy007 is offline
    MemberRank
    Feb 2013 Join Date
    MissouriLocation
    177Posts

    Re: Wanted: hof_furni downloader (full directory structure)

    Quote Originally Posted by tdid View Post
    Write yourself a php rip script :-)
    I'll make you one when I get back from school.
    That would be awesome, ty.

  6. #6
    Proficient Member prodigy007 is offline
    MemberRank
    Feb 2013 Join Date
    MissouriLocation
    177Posts

    Re: Wanted: hof_furni downloader (full directory structure)

    Made myself my own workaround. Had to set timeouts high enough to allow the script to run though, but it works fine.
    <?
    echo "Working...<br>";
    $grabfile[2]="";
    $resource_url = "http://images.habbogroup.com/dcr/hof_furni/";
    $local_file_path = "/swfs/test";
    $ch = curl_init("http://hotel-us.habbo.com/gamedata/furnidata");
    $fh = fopen("furnidata.txt", "w");
    curl_setopt($ch, CURLOPT_FILE, $fh);
    curl_exec($ch);
    curl_close($ch);
    $file = file('furnidata.txt');
    $patterns = array();
    $patterns[0] = "[[";
    $replacements = array();
    $replacements[0] = "";
    $furni = str_replace($patterns, $replacements, $file);
    $furni = implode("],[", $furni);
    $furni = explode("],[", $furni);
    $i=0;
    while($i < count($furni)) {
    //echo $furni[$i]."<br>";
    $grabfile = explode(",", $furni[$i]);
    $temPgf = $grabfile[2];

    if (strpos($furni[$i],'*')) {
    echo "Skipping ".$temPgf."<br>";
    } else {

    $revision = $grabfile[3];
    $revision = str_replace('"', '', $revision);
    $fileput = $local_file_path."/".$revision;
    $str_a = $revision."/".$temPgf;
    $str_b = str_replace('"', '', $str_a).".swf";
    $str = $resource_url.$str_b;

    if (!is_dir($fileput)) {
    mkdir($fileput, 0, true);
    echo "Directory ".$fileput." made.<br>";
    } else {
    echo "Directory ".$fileput." exists.<br>";
    }

    echo "Checking.. ".$str."<br>";
    $path = $local_file_path."/".$str_b;

    if (file_exists($path) == true) {
    echo "The file $path exists. ~Trying next file..<br>";
    } else {
    $fp = fopen($path, 'w');
    $ch = curl_init($str);
    curl_setopt($ch, CURLOPT_FILE, $fp);
    $data = curl_exec($ch);
    curl_close($ch);
    fclose($fp);
    echo "Grabbed: ".$temPgf."<br>";
    }

    }
    $i++;
    }
    echo "Finished!";
    ?>



Advertisement