Random Image

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Random Image

    its a random images script
    Code:
    $dir = "./images/";  //replace with image directory address
    $dh  = opendir($dir);
    $a = array();
    while ($filename = readdir($dh)) { $filename = $dir.$filename; if (getimagesize($filename)) { $a[]="$filename"; } }
    $rand = array_rand($a, 1);
    echo "<img src='$a[$rand]' style='max-width:100%;' />";
    use thanks button if u like it
    ImPoSsIbLe iS nOthInG aS ImPoSsible ItSelF SaYs "I M POSSIBLE"
Working...
X