need desperate help - a challenge!!

maxrpg

Verified User
Joined
Jan 26, 2004
Messages
10
hi guys i have been looking online for forums to help me but there is no uptodate ones that i can find. anyway im trying to find a certain SCRIPT (java, cgi, php ect) that will display all the images from one directory on the server. i have found loads but...well heres what i need it to do...

i need a script that will display all the images in a folder on my server...i DONT want it to create thumbnails or inlarge a picture when u click on them....just display them is all i want!!

i have an icon website where people can come and use icons for AIM (aol instant messenger) ...i want to add a feature where people can upload there own and have them displayed without me having to create a whole new template and then putting the icons on the page and taking ages to make the links and stuff :) lol

can u guys help me please?!? :\ ...i dont know where else to turn!!

thank you so much!!!
 
Link in my sig... search.. im going to guarantee you there is at least 1 script with what you are looking for!

Chris
 
thanx for your help guys :) ...i managed to find one or two scripts that would do what i wanted but they all use thumbnails which is annoying lol. all i want is a script that will display all the images in a directory n thats it..no thumbs..no links...nothin..nada..zip...doodle...ect lol :) . im going to keep looking anyway..must be one out there somewere rite :confused:

thanx guys!!;)
 
Haven't tested this, but it should work fine:

PHP:
<?
// Show images with these extensions:
$ext = array("jpg", "jpeg", "gif");
$pageTitle = "My Images";
echo "<html><head><title>$pageTitle</title></head><body>";
if ($handle = opendir('.')) {
   while (false !== ($file = readdir($handle))) {
       if ($file != "." && $file != ".." && in_array(substr($file, strrpos($file, ".") + 1, strlen($file)), $ext)) {
           echo "<img border=0 src=\"$file\"><br><br>\n";
       }
   }
   closedir($handle);
}
echo "</body></html>";
?>
 
Last edited:
Back
Top