Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Results 1 to 7 of 7

Thread: Gaming Resorce

  1. #1
    Join Date
    Jul 2007
    Location
    UK
    Posts
    2,470
    Tokens
    2,975

    Latest Awards:

    Default Gaming Resorce

    Hey guys,

    I need your help, basicly i am starting a gaming resorce site, i already have thousands of files, but that is my problem, to go through and add them all would take me forever, so is there a way via html or php to:

    put in the path to the folder, then on the page all of the folders and files are shown for the user to browse, so all i have to add is the path, then the script will find and display the files

  2. #2
    Join Date
    Apr 2008
    Location
    Derby
    Posts
    4,668
    Tokens
    262

    Latest Awards:

    Default

    http://www.clanthemes.com/tutorials-...directory.html

    Quick google search might not work

  3. #3
    Join Date
    Jul 2007
    Location
    UK
    Posts
    2,470
    Tokens
    2,975

    Latest Awards:

    Default

    I did, but i wasnt 100% sure on what to put so i couldnt find anything to do with what i needed

    Thanks

  4. #4
    Join Date
    Apr 2008
    Location
    Derby
    Posts
    4,668
    Tokens
    262

    Latest Awards:

    Default

    Okay, lol. Sorry I couldnt help more, Im in a bit of a rush lol

  5. #5
    Join Date
    Jul 2007
    Location
    UK
    Posts
    2,470
    Tokens
    2,975

    Latest Awards:

    Default

    OK, ive fixed it, but with this new script

    (downloadzi.co.cc)

    i want the files to show up as hyperlinks, anyway to do this?

    code:

    <?
    function showDir($dir, $depth=0)
    {
    if(!is_dir($dir)){
    die("not a directory");
    }

    $od = opendir($dir);

    while(($file = readdir($od)) !== false){

    if($file != "." && $file != "..")
    {
    if(is_dir("$dir/$file"))
    {
    echo "<tr><td>";
    echo str_repeat(" ", $depth) . " [$file]";
    echo "</td></tr>";
    showDir("$dir/$file", ($depth + 1));
    }
    else
    {
    echo "<tr><td>";
    echo str_repeat(" ",$depth) . " $file ";
    echo "</td><td>";
    echo ceil(filesize("$dir/$file")/1000)." KB";
    echo "</td></tr>";
    }
    }

    }

    }
    ?>
    <table>
    <tr>
    <th>Directory/File Name</th>
    <th>Size</th>
    </tr>
    <?
    showDir("/home/downloa1/public_html/game/");
    ?>
    </table>
    Last edited by Jack!; 22-08-2009 at 02:28 PM.

  6. #6
    Join Date
    Jul 2007
    Location
    UK
    Posts
    2,470
    Tokens
    2,975

    Latest Awards:

    Default

    Please help?

    Edit time over for above post

  7. #7
    Join Date
    Jan 2009
    Location
    Australia
    Posts
    853
    Tokens
    0

    Default

    Quote Originally Posted by 2fast2kwl View Post
    Hey guys,

    I need your help, basicly i am starting a gaming resorce site, i already have thousands of files, but that is my problem, to go through and add them all would take me forever, so is there a way via html or php to:

    put in the path to the folder, then on the page all of the folders and files are shown for the user to browse, so all i have to add is the path, then the script will find and display the files
    Ok, let me fix that for you:
    I need your help, basically I am starting a gaming resource site, I already have thousands of files, but that is my problem, to go through and add them all would take me forever, so is there a way via html or php to:

    Put in the path to the folder, then on the page all of the folders and files are shown for the user to browse, so all I have to add is the path, then the script will find and display the files.
    Can you pick the difference (in spelling mistakes)
    Last edited by VirtualG; 23-08-2009 at 05:46 AM.
    Cheap Layout Coding
    PM For Free Quote

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •