Results 1 to 10 of 10
  1. #1
    Join Date
    Jul 2004
    Location
    Bournemouth. UK
    Posts
    3,638
    Tokens
    0

    Latest Awards:

    Default PHP Or Javascript Banner Randomizer?

    Hey,

    Im looking for 1 of those random image things.
    Wether it be PHP or Javascript. I don't mind.

    I know Mentor did a thread on this but i can't find it

    Thanks :rolleyes:
    REMOVED

    Edited by jesus (Forum Super Moderator): Please do not have text in your signature which is over size 4.

  2. #2
    Join Date
    Jul 2004
    Location
    Sunshine Coast, Queensland, AU
    Posts
    1,830
    Tokens
    467

    Latest Awards:

    Default

    cuteandpastescripts have a random text program

  3. #3
    Join Date
    Jul 2004
    Location
    Bournemouth. UK
    Posts
    3,638
    Tokens
    0

    Latest Awards:

    Default

    >:I I said random image.
    REMOVED

    Edited by jesus (Forum Super Moderator): Please do not have text in your signature which is over size 4.

  4. #4
    Join Date
    Jul 2004
    Location
    Sunshine Coast, Queensland, AU
    Posts
    1,830
    Tokens
    467

    Latest Awards:

    Default

    yeah i think they hav that 2

  5. #5
    Join Date
    Jul 2004
    Location
    Bournemouth. UK
    Posts
    3,638
    Tokens
    0

    Latest Awards:

    Default

    Hmm. Id rather it didn't have to go to a website to get it because it will just take longer to load the page... That's why i asked for Javascript Or PHP.
    REMOVED

    Edited by jesus (Forum Super Moderator): Please do not have text in your signature which is over size 4.

  6. #6
    Join Date
    Nov 2004
    Posts
    1,221
    Tokens
    0

    Latest Awards:

    Default

    Hang on - Anderman has one, I'll nick the code off him now :p!

  7. #7
    Join Date
    Jul 2004
    Location
    Bournemouth. UK
    Posts
    3,638
    Tokens
    0

    Latest Awards:

    Default

    Rofl Cheers mate
    REMOVED

    Edited by jesus (Forum Super Moderator): Please do not have text in your signature which is over size 4.

  8. #8
    Join Date
    Aug 2004
    Location
    UK
    Posts
    11,283
    Tokens
    2,031

    Latest Awards:

    Default

    http://habboxforum.com/showthread.php?t=45838

    has a dinamcily ranom banner. or just a php one could work simply on the same basis
    PHP Code:
    <?php
    //image arrays
    // just ad decres it to remove images, also chnage image1.gif etc to images you wnat to dimainc image to randomize "/
    $stuff = array (
                    
    => "image1.gif",
                    
    => "image2.gif",
                    
    => "image3.gif",
                    );
    $display=rand(0sizeof($stuff)-1);

    //write banner
    echo "<img src='".$stuff[$display]."'>";

      
    ?>
    or if you would prefer javascript

    Code:
    <SCRIPT LANGUAGE="javascript">
    
    banners = new Array()
    banners[0]="image.gif"
    banners[1]="image2.gif"
    banners[2]="image3.gif"
    
    
    var Number = Math.round(2 * Math.random());
    
    
    var TheImage = banners[Number]
    
    document.write("<img scr='" +TheImage+ "'>")
    
        </SCRIPT>
    Last edited by Mentor; 12-06-2005 at 02:23 PM.

  9. #9
    Join Date
    Nov 2004
    Location
    Daventry, Northants
    Posts
    1,510
    Tokens
    0

    Latest Awards:

    Default

    I got mine of
    javascript.internet.com

  10. #10
    Join Date
    Jul 2004
    Location
    Bournemouth. UK
    Posts
    3,638
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Mentor
    http://habboxforum.com/showthread.php?t=45838

    has a dinamcily ranom banner. or just a php one could work simply on the same basis
    PHP Code:
    <?php
    //image arrays
    // just ad decres it to remove images, also chnage image1.gif etc to images you wnat to dimainc image to randomize "/
    $stuff = array (
                    
    => "image1.gif",
                    
    => "image2.gif",
                    
    => "image3.gif",
                    );
    $display=rand(0sizeof($stuff)-1);

    //write banner
    echo "<img src='".$stuff[$display]."'>";

      
    ?>
    or if you would prefer javascript

    Code:
    <SCRIPT LANGUAGE="javascript">
    
    banners = new Array()
    banners[0]="image.gif"
    banners[1]="image2.gif"
    banners[2]="image3.gif"
    
    
    var Number = Math.round(2 * Math.random());
    
    
    var TheImage = banners[Number]
    
    document.write("<img scr='" +TheImage+ "'>")
    
        </SCRIPT>

    Yaysie Thanks Mentor. And Anders ofcourse

    Just to let you know it worked Yay ;D
    Last edited by iRoss; 13-06-2005 at 03:39 PM.
    REMOVED

    Edited by jesus (Forum Super Moderator): Please do not have text in your signature which is over size 4.

Posting Permissions

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