Is it always the same number of digits? E.g. 6?
Your HTML could look something like:
<IMG SRC="digit.pl?position=5"
><IMG SRC="digit.pl?position=4"
><IMG SRC="digit.pl?position=3"
><IMG SRC="digit.pl?position=2"
><IMG SRC="digit.pl?position=1"
><IMG SRC="digit.pl?position=0"
The > is at the beginning of the next line to prevent some browsers (e.g. Netscape) to insert whitespace between
one digit and another.
Now all you have to do is:
- have 10 image files, one for each digit;
- find a way to differentiate between sessions, so that the counter progresses properly.
For example if you dynamically generate the page, you could have something like:
<IMG SRC="digit.pl?position=5&session=foobar-id"
><IMG SRC="digit.pl?position=4&session=foobar-id"
><IMG SRC="digit.pl?position=3&session=foobar-id"
><IMG SRC="digit.pl?position=2&session=foobar-id"
><IMG SRC="digit.pl?position=1&session=foobar-id"
><IMG SRC="digit.pl?position=0&session=foobar-id"
or even (which is text browser friendly):
<IMG SRC="digit.pl?digit=0" ALT=0
><IMG SRC="digit.pl?digit=0" ALT=0
><IMG SRC="digit.pl?digit=1" ALT=1
><IMG SRC="digit.pl?digit=9" ALT=9
><IMG SRC="digit.pl?digit=7" ALT=7
><IMG SRC="digit.pl?digit=3" ALT=3
Other possibilities include cookies.
This method makes it easy to glue together many images in your HTML, if it is dynamically generated, for example the result of a CGI. Otherwise digit.pl has to go through a god deal of work (presumably) to generate an progressive number for each visitor, which does not mean increase the counter every time digit.pl is called, not even every six times digit.pl is called, because basically you have no idea of what could happen.
So you may want to consider this solution if you dynamically generate your HTML, otherwise you require much more effort to make digit.pl work reliably for each digit and for each session/user.
-- TMTOWTDI |