A Conversation for How do I...?

displaying a random image

Post 1

Din'Amarth

I'm trying to set up my account on a message board to have my avatar display a random image out of a folder, or list, or whatever. I have found a variety of php and asp scripts that claim to be able to work out of an image tag, but I haven't been able to get any of them to work.

So, my question is how do I set up a random image script on one page that I can call from an image tag on another site?

~~Din'


displaying a random image

Post 2

SEF

It probably depends on how the message board software works.

If it lets you upload an image and then hangs on to that then there isn't much you can do about it. You might be able to make your image an animated GIF containing several images which slowly replace each other - not random but cycling through a fixed list set at creation time.

If the message board instead has code for the image, it might be possible to do something with javascript. However, I don't believe any board operators in their right minds would allow you that much control.

However, if the image is not an upload but a link to a site of your own, then you have a chance. You might be able to run software on your own site's server to continually replace the specified filename for the image with a different one or merely return different file data for a virtual filename every time it is accessed.


Key: Complain about this post

displaying a random image

Write an Entry

"The Hitchhiker's Guide to the Galaxy is a wholly remarkable book. It has been compiled and recompiled many times and under many different editorships. It contains contributions from countless numbers of travellers and researchers."

Write an entry
Read more