SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: random ssi file

  1. #1
    SitePoint Enthusiast Michael-from-Earth's Avatar
    Join Date
    Apr 2001
    Location
    Springfield, IL
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    random ssi file

    Hey there Jerky,

    I have found all kinds of stuff on generating random images and what not, but no answer to my question. So, alas, I must put my ignorance before you, the masses.

    What I want to do is call a random ssi from an asp page.

    For instance...

    Sometimes when the page loads I would like to include this:

    <!--#include file="folder/file-1.asp"-->

    sometimes this:

    <!--#include file="folder/file-2.asp"-->

    sometimes this:

    <!--#include file="folder/file-3.asp"-->

    so on and so forth... with perhaps 100 different file choices.

    Thanks for any help.

    -Michael

  2. #2
    You talkin to me? Anarchos's Avatar
    Join Date
    Oct 2000
    Location
    Austin, TX
    Posts
    1,438
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't think that SSI can directly do something like that, but you could execute a Perl script using SSI to do it for you.

  3. #3
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yep...that would be easily done. Load up the file names into an array and use PHP or Perl to pick a random name, then enter that into the SSI code.

    Heck...even I could probably code that and I suck at programming.

    Micheal...take a few minutes and try it yourself. I bet it would be easy for you once you figured out the basics.
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •