I'm trying to write a chat script.
In Visual Basic, there is a Timer control that you can set to do certain events (whatever you want it to do, basically) repeatedly for as quickly or as slowly as you want. Every second, every 3 seconds, every minute or hour, etc.
Is there anything like this in PHP?
I know I can use the META tag refresh but I'd rather just look at one little text file that contains only one piece of info, a Timestamp for when the last message was entered. Then, if the Timestamp is newer than the timestamp in your browser (maybe in a cookie) you know it's time to refresh. I think this would save bandwith - download one little number instead of an entire HTML file. A few bytes compared to possibly 10k.
I'm just starting in PHP so maybe I'm try something that's not possible. If so, what other suggestions can you make for updating the message section of the chat room?
Thanks, gs