imageload.php
Use this free PHP Script to dynamicaly include a folder full of images on a webpage. The administration is as easy as adding or removing files to a folder!
Requirements and Installation
PHP 4 or newer must be present on your webserver to use imageload.php.
To install imageload.php following these steps:
- Download and unzip imageload.php
- Upload imageload.php into the folder with the images on your server
- At the point where the images should be loadad in your document, include
<?php include("imageload.php"); ?>
in your XHTML document. - Don't forget to change the file name extension of your XHTML document to .php
Configuration
- Change the location of the folder with the images
- You can tell imageload.php to load the images from a diffrent folder. Change
$folder = opendir(".");
to../path/to/folder
- If you don't like the images loaded in alphabetical order
- Comment out
asort($index);
to set the date
Known Issues and Bugs
There are currently the following known issues in imageload.php:
- Only XHTML code will be generated. Welcome to the 21st Century!
To file a bug report please send email to nico at this domain.
Version history
- 1.2 8 May 2006
- The images will now be loaded in alphabetical order.
- 1.1 7 Apr 2006
- The
img
attributeswidth=""
andheight=""
are now generated. - The name of the image without the file extension will now be used for the
alt=""
attribute. - 1.0 6 Apr 2006
- Inital Release.
Acknowledgements
A big thank you goes to Andreas Grichting, he is the man behind the Code. I have just the ideas and need someone who can actually write it in PHP.
Copyright and License
Copyright © 2006 Superpixel, Nico Rohrbach. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name "imageload.php" nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
This software is provided by the copyright holders and contributors "as is" and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the copyright owner or contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.