Need quick php code - random page by day

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mkx
    Confirmed User
    • Nov 2003
    • 4001

    #1

    Need quick php code - random page by day

    I need a quick php code that will pull a random page from a list of url's and show a different page every day based on the server's time. The output should be the page url. Hope someone can help.
  • mortenb
    Confirmed User
    • Jul 2004
    • 2203

    #2
    this script pulls links using the day of the year as it's base..

    put the urls in a file called urls.txt - one on each line

    then put this in a .php file

    <?php
    $urls = file("urls.txt");
    echo trim($urls[date("z")]);
    ?>

    Comment

    Working...