PhpSnip.com

User Stats

Random Pic

Simple php random picture, every time you reload the site it changes the picture. Simple but effective.

Info

 Download  View Source (print view)
 Rating : 4.7  Views : 352

Source Code ( 15 lines )

<html>
<TITLE> Random Pic  -- <> core.KAOTIK.org <> - </TITLE>
<body>

<?
    /* random number generator */
    Srand(date("s"));

    /* 6 pictures, named 'pic0' to 'pic5' */
    $n = Rand() % 5;
   echo "<img src="pic$n" border="0" alt="random chosen pic">"
?>

</body>
</html>

Search

Subscribe

  Rss Feeds

Sponsors

Advertise