|
|
|
Store all your images that you want to display in the same folder you specified
above. DO NOT store anything you do not want to display such as files.
This script reads the entire folder you specify and displays the contents at random
If you want to retain the size of the images, add a width to the last line
| <?php
$Image_Path = "/path/to/site/root"; // Root Path - no slash on end
$Image_Folder = "Images"; // Directory name of the folder storing your images
srand((double) microtime() * 10000000);
$imgdirpath = opendir("$Image_Path/$Image_Folder");
while (false !== ($imgfile = readdir($imgdirpath))) {
if ($imgfile != "." && $imgfile != "..") {
$imgpath = "$Image_Path/$Image_Folder/$imgfile";
$imageimg[$imgfile] = basename($imgpath);
}
}
closedir($imgdirpath);
shuffle($imageimg);
list( ,$img_value) =each($imageimg);
echo "<img src=\"$Image_Folder/$img_value\">\n";
//============================================================
?> | | |
|
| Creating thumbnails from MySQL Blobs online Categories : PHP, MySQL, Graphics, HTML and PHP, Databases | | | webcam cam view image ispy browser independant Categories : Graphics, HTML, HTML and PHP, PHP | | | Functions for loading images into a MySQL database and displaying them. Categories : Graphics, HTML and PHP, MySQL, PHP, Databases | | | This program implements hot link prevention in php. It is useful for webmasters who do not have access to the server at a level where they can control hot linking can still supply some type of hot link prevention for thier site by using php. Categories : PHP, Filesystem, Graphics, Content Management | | | This is a simple photo gallery that reads the image files from multiple directories, and generates a web page styled with CSS1. It opens single auto window to view and print a given image.
Categories : Graphics, Filesystem, PHP, Complete Programs | | | Upload images restricted by pixel size (Picture width and Picture Height) Categories : PHP, HTML and PHP, Graphics | | | Snipe.Net's Web Design Color Scheme Previewer- Allows uses to input hex
codes for their text, background, and link colors, and preview the color
scheme with their background image. Example:
http://www.snipe.net/tech/snipeschool/hex.php3 Categories : PHP, HTML and PHP, General, Graphics, HTML | | | PHPixel - output of 1 pixel transparent/colored gif for counters etc. Categories : PHP, Graphics, HTML and PHP | | | How to let a user download a picture by clicking on it instead of needing to right click and Save-As. Categories : HTTP, PHP, HTML and PHP, Filesystem | | | upload function using PHP's FTP abilities. Categories : PHP, Filesystem, HTML and PHP | | | Barcodes On The Fly With GD Categories : Ecommerce, Graphics, HTML and PHP, PHP | | | Easy slideshow with php. Just place this one file into a subdirectory where jpg files reside. An instant slideshow is yours. MS explorer only. Categories : PHP, Filesystem, Graphics | | | Simple PHP/3 Access Counter (using GD and DBM functions) Categories : Databases, PHP, Graphics, HTML and PHP, dBase | | | Opening and formatting text files into HTML on the fly- or HTML from templates. Categories : PHP, HTML and PHP, Filesystem | | | Handle multiple file upload Categories : Complete Programs, Filesystem, PHP, HTML and PHP | |
| | | | Saravanan .R wrote : 1157
Hi,
Iam an Winodows Users. I have Apache 1.3.x and PHP 4.3.x. this code doesn`t work for the above environment.
| | | | Ron FREDERICK wrote :1159
This was developed using Apache and built using windows XP.
| |
|
|
|