PHP Classes

Image Rotator: Pick random file from a directory to display

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStarStar 63%Total: 1,155 All time: 3,276 This week: 488Up
Version License Categories
imagerotator 1.0FreewareFiles and Folders
Description 

Author

This class can pick a random file from a directory. Despite it can be used for displaying rotating banner images, it can be used to randomly pick an other type of file.

The class can traverse a given directory to retrieve all files of a given list of file name extensions. Then it can pick one file randomly to be returned as the selected file.

Optionally, the starting directory can be traversed recursively. This way the class can return files from sub-directories of the starting directory.

Picture of Harish Chauhan
Name: Harish Chauhan <contact>
Classes: 28 packages by
Country: India India
Innovation award
Innovation award
Nominee: 1x

  Files folder image Files (2)  
File Role Description
Plain text file imageRotator.inc.php Class Main Class
Accessible without login Plain text file image_rotator_test.php Example Example

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:1,155
This week:0
All time:3,276
This week:488Up
User Ratings User Comments (2)
 All time
Utility:91%StarStarStarStarStar
Consistency:83%StarStarStarStarStar
Documentation:-
Examples:91%StarStarStarStarStar
Tests:-
Videos:-
Overall:63%StarStarStarStar
Rank:836
 
I used this package and it worked just fine, great work!
11 years ago (Isak Mokgabudi)
65%StarStarStarStar
Excellent
15 years ago (kishore kumar)
70%StarStarStarStar