Can't find a simple code..

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Royaltee_Gee
    Confirmed User
    • Jul 2001
    • 973

    #1

    Can't find a simple code..

    Ok im looking for a simple code....

    Ok it's a code you place in an html file and it forwards to a different url everytime.. and the urls i define in the code.

    so if someone goes to

    http://www.domain.com/test/

    they'll get a different url each time, which just cycles through the list of urls I define.. So I could have like 10 different urls it goes to, so the 1st time they get URLA , 2nd Time URLB, etc... etc..


    I know this is a simple code.. but having trouble finding it on the net.

    thanks i advance guys.
  • hyper
    Confirmed User
    • Mar 2002
    • 5294

    #2
    i saw it yesterday
    but forgot where

    Comment

    • mrthumbs
      salad tossing sig guy
      • Apr 2002
      • 11702

      #3
      This is what you need
      Last edited by mrthumbs; 07-30-2002, 06:17 AM.

      Comment

      • Captain Canada
        Confirmed User
        • Jun 2002
        • 469

        #4
        <?$f = file('your_list.txt');srand((double)microtime()*10 00000);$num = rand(0,count($f)-1);$url = $f[$num];header("Location: $url");?>

        Save as php file example list.php

        Put each url in a text file - one url per line - call it something like your_list - save as .txt file

        Your url would look like http://www.your_domain.com/list.php

        Comment

        • Captain Canada
          Confirmed User
          • Jun 2002
          • 469

          #5
          Check the quote for the above post to get the file

          Comment

          Working...