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 5 of 5
  1. #1
    Join Date
    Oct 2005
    Location
    Spain, Valencia
    Posts
    20,492
    Tokens
    3,575
    Habbo
    GoldenMerc

    Latest Awards:

    Default Auto adding to a page

    Well i want avatars to automatically add to a page, so once they hit the directory they will automatically upload to the site in a image format. there on the same sever, how would i do this?
    Ross

  2. #2
    Join Date
    Oct 2005
    Location
    Spain, Valencia
    Posts
    20,492
    Tokens
    3,575
    Habbo
    GoldenMerc

    Latest Awards:

    Default

    anyone?

  3. #3
    Join Date
    Jul 2004
    Location
    Ottawa, Canada
    Posts
    1,363
    Tokens
    106
    Habbo
    Yonder

    Latest Awards:

    Default

    Explain please i dont understand what you want to achieve.

  4. #4
    Join Date
    Sep 2005
    Posts
    888
    Tokens
    177

    Latest Awards:

    Default

    Basically you need to get the listings of the directory, then for each image (i presume the folder will just contain images?) add a <img src="$file"> tag around it. The $file would come from the listing of the directory


    edit:
    http://php.net/manual/en/function.readdir.php

    so the code would be something like the 2nd example (i changed it a little)

    PHP Code:
    <?php
    if ($handle opendir('avatar')) {
        while (
    false !== ($file readdir($handle))) {
            if (
    $file != "." && $file != "..") {
                echo 
    "<img src='$file'>\n";
            }
        }
        
    closedir($handle);
    }
    ?>
    Last edited by Blinger$; 12-12-2009 at 12:32 AM.

  5. #5
    Join Date
    Oct 2005
    Location
    Spain, Valencia
    Posts
    20,492
    Tokens
    3,575
    Habbo
    GoldenMerc

    Latest Awards:

    Default

    So im guessing the php file would be in the document with where i want the images put? then the images would be in the same folder?
    Ross

Posting Permissions

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