PDA

View Full Version : need desperate help - a challenge!!


maxrpg
02-04-2004, 09:23 AM
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!!!

ctnchris
02-04-2004, 10:48 AM
You can do this with php, an example would be
http://www.phpfreaks.com/quickcode/Self_Generating_Gallery/116.php

you can find more examples using the directory functions at http://us4.php.net/dir

ProWebUK
02-04-2004, 11:15 AM
Link in my sig... search.. im going to guarantee you there is at least 1 script with what you are looking for!

Chris

maxrpg
02-08-2004, 04:29 PM
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!!;)

loopforever
02-08-2004, 06:36 PM
Haven't tested this, but it should work fine:


<?
// 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>";
?>