Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- $a = opendir('.');
- while($c = readdir($a))
- if(in_array(strtolower(strchr($c, '.')), array('.png', '.jpg', '.jpeg', '.gif')))
- $d[] = $c;
- if(!@count($d)) die;
- $c = $d[rand(0, count($d)-1)];
- header('Content-type: image/' . substr(strtolower(strchr($c, '.')),1));
- readfile($c);
- ?>
Add Comment
Please, Sign In to add comment