in reply to Need a way to print script output to web page?

Oh, a retro-site! Webcounters are so mid 1990's!

I got to ask you, why do you think people are interested in seeing an up-to-date count of, uhm, yeah, what actually? Certainly not the count of visitors, as such counters don't count hits served from proxies. Or let me phrase that another way. What goes through your mind if you visit a web page, and it says you are visitor 123456 since some point in the past? Do you get thrilled? Do you keep a diary where you write down your score? Do you even read it?

Anyway, your program is riddles with problems. It might work well if you get just a handful of requests, distributed over the day. But you a have a problem each and every time you have two hits almost simultaneously.

If you really must include a counter, does it have to be up-to-date to the second? Why don't you just generate the entire page, including a new count, every night? You can get the count from your log files.

Abigail
-- 
You are visitor 1,578,920,023 since the third month of the 15th year of the reign of Ramses II.

  • Comment on Re: Need a way to print script output to web page?

Replies are listed 'Best First'.
Re^2: Need a way to print script output to web page?
by Anonymous Monk on Feb 12, 2004 at 09:55 UTC

    Remember the fanatics who saw that their webpages were only getting 5 hits a day, so they manually editted the number every few hours to make it look like their sites were popular? Then of course the late 1990's came and cron jobs were thrown together to manipulate the hit counts automatically! Then came 2000 and suddenly a document is given a 50 thousand hit count before the page is even posted in the public's view. Of course, the cool people just generated a (pseudo)random number to show as the hit count on each hit. And then there were those who just put a static number in their plain HTML documents to make it appear as though they had a counter when they never did. See, history can be fun.

A reply falls below the community's threshold of quality. You may see it by logging in.