rendered paste body<html><head><title>ABCDEF: Random Image GENERATOR!!!!!</title></head><body><center><?php $path_file = pathinfo(__FILE__); $rdir = $path_file['dirname']; //Or change this if you want $rdir_dir = opendir($rdir); $hdir = "http://www.flymoore.com/img_rnd"; //Change this to the root flolder function no_text($val) { if (is_dir($val) || pathinfo($rdir . "/" . $val,PATHINFO_EXTENSION) == "php" ) return false; return true; } $darr = array(); while (false !== ($f = readdir($rdir_dir))) $darr[] = $f; $darr = array_values(array_filter($darr,"no_text")); $num = array_rand($darr); $img = $darr[$num]; print("<img src='$hdir/$img'>"); $num++; $count = count($darr); print("</br><b>$num of $count!</b>");?></center></body></html>