Creativebits.org

an All Creative World site
Anonymous's picture

random image? how to?

i'm making a website using lastest web-standarts and i need to know how can i make a random image generation for the header, i mean everytime then the user visits the site or reloads it, the header changes it's image, i saw this in several sites(i don't remeber where....).

thanks.

//Static

Commenting on this Forum topic is closed.

afterglow's picture
571 pencils

I use a random image generator on my frontpage using a bit of php scanning a predefined folder of images. http://www.afterglow.ie/images/soitbegins/rotate.php Reload for the desired effect. As for the script its on one of these.
-------------------------------
http://photomatt.net/scripts/randomimage
http://www.hiveware.com/imagerotator.php Link might be wonky at the mo
http://www.automaticlabs.com/
-------------------------------
www.afterglow.ie

kenyabob's picture
303 pencils

see below

kenyabob's picture
303 pencils

Although I originally wanted a script that would simply scan images in a folder on the server, ultimately picking one at random, I finally settled for the following script. It has worked pretty well, and besides having to enter image names in manually, I like it. See it in action here.

Static's picture

that's exactly what i was looking for! :D

and where i put the link to the image?
i mean my html is with , i need to put the image between the divs or
i can put in my css like:

#header{
background-image: url(bla bla bla/randomimage.php);

??

Creativebits is a blog about creativity, design and Macs. We also have a critique section where you can post your work to get opinions and a forum to discuss any design related topics.

Recommend us on Google

Latest critique

Do you need a great new logo?

If you need a logo for your company or product you can get it done with us.
In our logo store you can pick from over 28,000 pre-made logos that will be customized to your name for free or you can post a contest for us for just $250 and our designers from all over the world will submit dozens of logo design suggestions to your specific needs.

Marketplace