This code allows you to dynamically list a directory's image files, creates links to them, and tells you their size in pixels and kilobytes.
Download
View Source (print view)
Rating : 4.7
Views : 142
<?php
$handle=opendir('.');
$strSought = "JPG";
$num = 0;
while ($file = readdir($handle)) {
if ($strSought == substr($file, -3)) {
$num = $num + 1;
}
}
closedir($handle);
$handle=opendir('.');
echo "There are $num files!<br><br>";
echo"<table>";
echo "<tr><td colspan = 5>Files:</td></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>";
?>
how to use this code, php_tools, yahoo_status_shopping_cart.php, php file upload, shopping_cart and user=0--, drop down, mysql_commit, forum, shopping_cart', backup, updateoraddimagesonpages, rtttl to 8 bit source code, stefan_hornea, rent_and_0=1_union_select, how to run php, php_script"_class="neww"_target="_blank"_title="im_neuen, embed_snippets, farah_aead, sql incection, antoine anik, i need webmail login name and password