Posted By: kurtie
Script to see the amount on online users on a site - 17/08/08 08:08 AM
I'm looking for a script which allows me to post a link on my websites to the chat, but I want to include after that link the amount of online users.
For example: chatlink (12 online)
Can someone help me please?
Posted By: Strider
Re: Script to see the amount on online users on a site - 17/08/08 08:58 PM
I don't know the setup of your HTTP server and which scripting language you're using, but here are some ideas:
If your computer is the HTTP server, then a simple solution would be writing (and updating periodically) a file to a path reachable by the scripting language (PHP, for example) and then reading the file and creating the markup for the link each time a user requests the page where you want to show it.
If the HTTP server is somewhere else, then you could create a "secret" page that receives a query string or POST parameter and then uses it to update either a file or a value in an SQL database. All you would need to do is to access this page with mIRC periodically while sending the number of users as the parameter. Then you would have to read the file or database value to create the markup for the link each time a user requests the page where you want to show it.
These solutions are mIRC-based, but the optimal one would be not using mIRC at all, but an independent process that updates the value.
Posted By: vexx0r
Re: Script to see the amount on online users on a site - 18/08/08 06:47 AM