Guest User

Untitled

a guest
Jun 25th, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.28 KB | None | 0 0
  1. <?
  2. $a = opendir('.');
  3. while($c = readdir($a))
  4.     if(in_array(strtolower(strchr($c, '.')), array('.png', '.jpg', '.jpeg', '.gif')))
  5.         $d[] = $c;
  6. if(!@count($d)) die;
  7. $c = $d[rand(0, count($d)-1)];
  8. header('Content-type: image/' . substr(strtolower(strchr($c, '.')),1));
  9. readfile($c);
  10. ?>
Add Comment
Please, Sign In to add comment