Friday 15 March 2013

[PHP] How Many Users Online

Hello a Little Programmer
Today i will show you , how to see Online People on your website.
Very Simple & i Hope You enjoy with this tutorial

Step1:
Creating the database create a new database called 'users', with 3 fields inside a table. These fields are timestamp, ip and file. Name the table useronline by the way. Now with the form on the PhpMyAdmin page,
add the following code:



Step 2: The PHP Script



I've tried to make that code as simple as possible to understand. The //comment won't affect the script, so you can remove those if you want. The script basically works like this. It receives server information and gets he time. In mySQl it fills in the values of the person online and puts up a message if it failed. When the user leaves mySQL deletes the user and displays a message if it failes.


 Resource Program Here

0 comments:

Post a Comment