/ Published in: PHP

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php // set the $folder to the folder containing the images // You then use <img src="/path/to/this/script.php" alt="image randomiser" /> // to display them $folder = 'banners'; $extList['gif'] = 'image/gif'; $extList['jpg'] = 'image/jpeg'; $extList['jpeg'] = 'image/jpeg'; $extList['png'] = 'image/png'; $img = null; $folder = $folder.'/'; } if ( ) { $img = $folder.$imageInfo['basename']; } } else { if ( ) { $fileList[] = $file; } } $img = $folder.$fileList[$imageNumber]; } } if ($img!=null) { $contentType = 'Content-type: '.$extList[ $imageInfo['extension'] ]; } else { } } ?>
URL: http://www.purpleoak.co.uk
Comments
