The PHP version of the random avatar. 1.31 bytes PHP random display avatar? Readfile(rand(0, 52.16..jpg );? 2 .? Php $ urlpic; image address, with the relative path $ filesarray (); if ($ handleopendir ($ url) {while (false! ($ File 1. 31 bytes PHP random display Avatar
2.
$ Url = 'Pic ';
// Image address, with relative path
$ Files = array ();
If ($ handle = opendir ("$ url ")){
While (false! ==( $ File = readdir ($ handle ))){
If ($ file! = "." & $ File! = ".."){
If (substr ($ file,-3) = 'GIF'
Substr ($ file,-3) = 'jpg ') $ files [count ($ files)] = $ file;
}
}
}
Closedir ($ handle );
$ Random = rand (0, count ($ files)-1 );
If (substr ($ files [$ random],-3) = 'GIF') header ("Content-type: image/gif ");
Elseif (substr ($ files [$ random],-3) = 'jpg ') header ("Content-type: image/jpeg ");
Readfile ("$ url/$ files [$ random]");
?>
Why? Readfile(rand(0, 52.16.'.jpg ');? 2 .? Php $ url = 'Pic '; // Image address, with the relative path $ files = array (); if ($ handle = opendir ("$ url ")) {while (false! = ($ File...