SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Sep 2001
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Random htmlpage script?

    im thinking about having a site where i will show random htmlpages... should be pretty much like a random image script.

    anyone know any good script that can do this?

  2. #2
    I'm a college yuppie now! sbdi's Avatar
    Join Date
    Jul 2000
    Location
    Dublin , Ireland
    Posts
    1,271
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Do you mean just show random HTML or goto a random page? If its a random page I can give you a javascript for it, tis quite easy actually.
    Back Again

  3. #3
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here is a PHP solution for you:

    PHP Code:
    <?php

        $pages 
    = array("page1.htm""page2.htm""page3.htm""page4.htm");

        
    shuffle($pages);

        include 
    $pages[0];

    ?>
    Just replace all of the pages (eg page1.htm) with the names of pages containing the HTML. Then save the script in the same folder as the pages.

    Sean
    Harry Potter

    -- You lived inside my world so softly
    -- Protected only by the kindness of your nature

  4. #4
    SitePoint Member
    Join Date
    Sep 2001
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thx a bunch seanf!

    exactly what i was looking for


    excellent excellent!

  5. #5
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Glad I could help!

    Sean
    Harry Potter

    -- You lived inside my world so softly
    -- Protected only by the kindness of your nature


Bookmarks

Posting Permissions

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