Copy this code and paste it ino a new file called index.php. Put index.php in the directory you want listed. Upload it to your webserver and see your files in www.yoursite.com/whatever/index.php
<?php
$ext_arr = array("jpg","png","gif");
$ext = $_GET['ext'];
$handle=opendir('.');
if(!isset($ext))
{
$strSought = "jpg";
}
else
{
if(in_array($ext, $ext_arr))
{
$strSought = $ext;
}
else
{
$strSought = "jpg";
}
}
$num = 0;
while ($file = readdir($handle))
{
if ($strSought == substr($file, -3))
{
$num = $num + 1;
}
}
closedir($handle);
$handle=opendir('.');
echo "There are $num $strSought files!<br /><br />";
echo "<ul>nt";
foreach($ext_arr as $key)
{
echo("<li><a href="".$_SERVER['PHP_SELF']."?ext=$key">$key</a></li>nt");
}
echo "</ul>";
echo"<table>";
echo "<tr>nt<th>Files:</th>nt<th>Width</th>nt<th> </th>nt<th>Height</th>nt<th>Size</th>n</tr>";
while ($file = readdir($handle))
{
if ($strSought == substr($file, -3))
{
$size = GetImageSize($file);
$fullsize = intval(filesize($file)*.001);
echo "<tr><td><a href=$file>$file</a></td><td> <b>$size[0]</b></td><td> by</td><td> <b>$size[1]</b>:</td><td> $fullsize kb</td></tr>";
}
}
closedir($handle);
echo"</table>";
?>