Results 1 to 5 of 5

Thread: Random Picture

  1. #1
    Join Date
    Dec 2004
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Random Picture

    Hi,
    Well Im Looking For A Script That Gives Out A Random Picture Every Ammount Of Time ( 24 hours ).I Have Seen Does Scripts Of Random Picture Everytime You Refresh But Its Not Exactly What i Want.I Wanted A Script That Randomly Selects A Picture Out Of A Folder And Not One That U Have To Give Every Pictures Url( Since i want to have around 500+ pictures and cant give a link to each one :P) Well thanks for your time

  2. #2
    Join Date
    Aug 2004
    Location
    Brighton
    Posts
    1,563
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I think that for all scripts, you have to specify the photos required... it's unfortunate and time consuming, but it has to be done.

    I'll have a quick look around for a script like you want though, and report back if I find anything.

    Merry Christmas
    cr3ative
    A retired member, drop me a line through my site if you'd like to find me!
    cr3ative media | read the stickies

  3. #3
    Join Date
    Dec 2004
    Location
    Windsor, UK.
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    If using JavaScript then you'd have to specify all the images required as it doesn't have the permissions to scan photos in a directory.

    What you could do is name each picture 1.jpg through to 500.jpg and then have the JavaScript pick a random number, add .jpg and call up the image.

    But if you use PHP or Perl, they can both scan a directory for the photos in it, and pick one at random, no matter what the file names are.

    You may find this link helpful:
    http://hotscripts.com/PHP/Scripts_an...ges/index.html

  4. #4
    Join Date
    Feb 2006
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi. I'm looking for a similar code. I have a code that makes the images random, which is good, but now, i want them to link to pages. The randomized images are banners to friends of our sites, and i want them to link to their respective websites. Can anyone help me out here?

  5. #5
    Join Date
    Mar 2006
    Location
    SoCal, USofA
    Posts
    39
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Sounds like a job for sql to me, but I don't know that much.

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
  •