Click here to get back home

random pics

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
random pics prophet 04-13-2008
Posted by prophet on April 13, 2008, 9:48 pm
Please log in for more thread options
I am new to this so sorry for what is probably a simple question...

I want to have a picture that changes at random each time you go to the page
so that it is different.

Thank you



Posted by Ed Mullen on April 13, 2008, 10:12 pm
Please log in for more thread options
prophet wrote:
> I am new to this so sorry for what is probably a simple question...
>
> I want to have a picture that changes at random each time you go to the page
> so that it is different.

http://www.google.com/search?query=web%20page%20random%20picture&num=50

--
Ed Mullen
http://edmullen.net
Why do we say something is out of whack? What is a whack?

Posted by while-one on April 13, 2008, 11:23 pm
Please log in for more thread options
......or do it server-side with a scripting language, perhaps php

function randPicName()
{
$cnt=-1;
$dir = opendir("/var/www/my-site/my-images/my-rands");
while ( $file = readdir($dir))
{
if($file[0] != ".") /// or call some fancier isImage function
{
$cnt++;
$pics[$cnt] = trim($file);
}
}

srand((double)microtime()*1000000);
$randval = rand(2,$cnt);
$pic = $pics[$randval];

/// this is an image name only, so you'd
/// have to prepend a path to make an img src url with it.
return ($pic);
}

Similar ThreadsPosted
PORNO SEX PICS May 23, 2005, 2:23 pm
see rebosome pics] November 21, 2007, 1:47 am
******FREE DOWNLOADS Pics. n Vids.*********** November 11, 2007, 9:50 am
I have soooo many pics of Marge Simpson masturbating July 14, 2004, 1:18 pm
How to view pics in layout mode in Dreamweaver 8? February 12, 2006, 6:23 am
*** Free Downloads and Webcams... Pics Movies and more *** October 14, 2006, 11:37 pm
some random problems with this site April 16, 2007, 2:42 pm
repost: some random IE problems with this site April 19, 2007, 10:01 am
Random display of 10 text / banners on a page?? November 21, 2005, 2:00 pm
Modding a RA player code to play random music December 8, 2004, 11:37 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap