Not long ago I came across this website: http://www.danasoft.com/ This websites provides dynamically updating signatures which are pretty cool in my opinion. There is just one thing that I don't get and would really like to know how to do. Here's a direct link to an image on the website: http://www.danasoft.com/vipersig.jpg Try refreshing. Notice it changes? How do I achieve that? How do I have a direct link to a file like www.mypage.com/thing.jpeg output different images each time?
Asked
Active
Viewed 576 times
2
-
use a cgi and generate an image on the fly using libgd, imagemagick, and friends – sehe Jun 27 '11 at 22:20
1 Answers
0
Basically, the URL is not actually retrieving the file directly each time, but rather the server is intercepting that URL and serving a (possibly random) image from a larger set of images. Depending on whether the server is running Apache, IIS, etc, the implementation could vary... This could also probably be achieved with the MVC routing engine by defining a custom route handler for URLs ending in '.jpg', but I'm not actually sure.
EDIT:
See this discussion for more detail on the MVC implementation.

Community
- 1
- 1

chrisfrancis27
- 4,516
- 1
- 24
- 32