// avatar gallery (index.php) // Copyright 2005 Tracy Ward // This code is released under the GPL license VERSION 2 ONLY. // (see https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt or the COPYING file in this directory.) // check to see if the "zlib" extension is available, and if so, enable zlib output compression. if(extension_loaded("zlib")) { ini_set('zlib.output_compression_level', '9'); ob_start("ob_gzhandler"); } // this code currently depends on the mimetype php extension, which is deprecated. define("AVATAR_VERSION", 0.16); // config items $show_names = true; $show_dates = true; // TODO: error checking on opendir(), check for the mimetype extension. ?>
Welcome to my avatar images collection. Please feel free to save any of these images for your own use. If you wish to use them, please do NOT link directly to them here. Instead, save a copy and upload it to your own server. Alternately, if your forum has a spot to upload an avatar image from a URL, you may use the image here directly. I have written a PHP script which randomly selects one of these images and returns it. The script can be easilly adapted to do other stuff, such as selecting the proper avatar image for the proper season. This index page was generated by this PHP script. (COPYING file) Enjoy.
$i = 0; $d = opendir("."); $imgs = array(); while(($file = readdir($d)) !== false) { if(is_dir($file)) continue; $mtype = @mime_content_type($file); if(0 != strcasecmp("image", substr($mtype, 0, 5))) continue; $imgs[] = $file; } closedir($d); natsort($imgs); reset($imgs); while(list($dummy, $file) = each($imgs)) { print ''; print ''; if($show_names === true) print ' |
' . $file; if($show_dates === true) { $d = filemtime($file); if($d !== FALSE) { print ' |
' . date('Y-m-d', $d); } } if(($show_names === true) || ($show_dates === true)) print ' |