
May 31st, 2006, 11:04 PM
|
|
Up To No Good!
|
|
Join Date: Jan 2001
Posts: 69
Time spent in forums: 6 h 26 m 20 sec
Reputation Power: 8
|
|
|
Script to display the latest updates/posts on the website
Ok, I am just wondering what would be the best way to accomplish this...
I am trying to create a website where an admin would be able to post short messages and updates (one line of text, pretty much) every couple of minutes, sometimes even few of them per minute.
Those messages would then get stored into mySQL database for backup and reference on the website (from users' member area).
However, I am trying to develop a client application that would run on a users' computer and check this website/database for updates and new messages every 10-20 seconds (yes, real time notifications are very important).
Now, how would I store all the newest messages for this client application, and what would be the best programming language to code this application which will require user authentication before it can query server for any more information (only registered users will be allowed to access the updated messages)?
I was just thinking of creating a TXT file in a password protected area, and every time the admin posts a new message the current TXT file will get overwritten with the new message. Therefore, all it would contain would be the latest message. Now, assuming that the admin takes at least 20-30 seconds to post a new message, and the client application queries this TXT file every 10 seconds, it might be a viable solution. (Then again, what if there are multiple admins posting messages simultaneously?)
Next idea was storing the last 10 entries in an XML file with timestamps or some numbering scheme that will allow the client application to display only the messages with the number higher than the last message checked or something.
Another idea was to use Pear and SOAP to take care of this, but I have no idea about that (might have to do some reading up on just to get a clue)...
Any other ideas?
|