I have made a basic chat room. It refreshes every 3 seconds to show the latest messages taken from a text file.
The problem is that this refreshing is messing up the site statistcs for hit counts and referrals etc.
Is there any way of not counting a refresh as a hit (the site counter is done automatically by the server) or do you have any advice about a different approach to php chat rooms ?
Thanks
Al
Advice please
Well...every time you refresh the page, you're re-requesting the page from the server. That's gonna register a hit. No way around it.
It's possible, though, that if you have access to mod_rewrite and virtual domains, you might be able to set up your chat script in its own virtual domain with a log set to /dev/null, which would effectively cause it to not log anything.
Thanks for your advice Chris ill look into that. Do most php chat scripts use refreshing as a means of getting the latest info do you know ?
Al
Yes, every PHP chat page will do that.
A much better solution is a Java applet. It's a pain to set up, but it will drastically reduce the stress load on your server.
install webalizer (it counts 'visits')