Advertisement
Eeems

Untitled

May 24th, 2011
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.30 KB | None | 0 0
  1.     <?php
  2.         $ext = "jpg";
  3.         header("Content-Type: image/$ext");
  4.         $d = scandir('.');
  5.         foreach($d as $f){
  6.             if(substr($f,-1-strlen($ext))==".$ext"){
  7.                 $files[] = file_get_contents($f);
  8.             }
  9.         }
  10.         echo file_get_contents($files[rand(1,count($files))-1]);
  11.         //Thank you Netham45 for this great script
  12.     ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement