CGI Scripts by Kevin

Random File Picker v1.0

In Short:

This is another very simple script which will pick a random file, given search critera (and not defining every file). Multiple searches are supported.

Demo:

Click here

Instructions:

First, set the $BaseURL variable to "http://server.com/". Next add searches to $RandomArray. All searches look like this:

$RandomArray{'search'} = "ServerDir,VirtualDir,Mask"


  • ServerDir is the actual directory to look for files, ie. /home/site/www/files/
  • VirtualDir is the URL used to access that directory ie. files/
  • Mask is the filemask you want to search for ie. *.mid for only MIDI files.

    Upload to your server in ASCII mode, chmod 775. To get a random file go to http://server.com/cgi-bin/ranfile.pl?Search Since this script uses redirects you don't need to worry about setting up mime types within the script, the server should take care of that.

    Download:

    Click here

    "By downloading this script I agree to indemnify DataDragon Information Services from any damage that could be done by this script. In other words, it's my own tough cookies if this script wreaks havok on my web server."

    Register:

    EMail:
    Location Used:
    Script:
    Subscribe to List:YesNo

    cgi-scripts@DataDragon.com
  •   Listing of Scripts

    Other Resources