RE: [PHP] using GetImageSize in a directory of images

From: Date: Wed, 11 Jul 2001 20:51:37 +0000
Subject: RE: [PHP] using GetImageSize in a directory of images
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-57488@lists.php.net to get a copy of this message
(This is assuming you'll have all images in the directory, and no other file types...) $directory = opendir("./"); $dirEntry = readdir($directory); // Skip "." $dirEntry = readdir($directory); // Skip ".." while($dirEntry = readdir($directory)) { // GetImageSize Code for Each $dirEntry Goes Here } closedir($directory); If you may have other types of files besides images, you could easily check each filename with strstr() or a regex. -----Original Message----- From: Rory O'Connor [mailto:midget@elaris.com] Sent: Wednesday, July 11, 2001 3:09 PM To: php-general@lists.php.net Subject: [PHP] using GetImageSize in a directory of images recent posts introduced me to the handy GetImageSize, and it's just what I need! What I want to do is write a script that will go through a directory of images and write [image name];[image dimensions] to a file so I can query that into my products database for dynamic use on my site. BUT, i'm a super-duper PHP newbie and i'm unfamiliar with the syntax for looping thru all fils in a given directory. Can anyone point me in the right direction? Thanks so much! providing the finest in midget technology -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#57488) next »