Create “Who is online” widget
Tutorialzine has writen article and teach us how to create “Who is online” widget with PHP, MySQL & jQuery. It will display the number of visitors, currently viewing your site, and it will even be able to detect the country our visitors are from and display it in a slide out panel.
All of the widget data is stored into the tz_who_is_online table. It consists of six fields (or columns). The first one – ID, is a standard primary key / auto increment field. After this is the IP field which stores the visitor’s IP address (converted to a integer beforehand with the ip2long PHP function).
The widget features a slick slide-out panel with all the geolocation data, shown on mouse over. Having access to real time data on your site userbase is a dream to any webmaster. Tools like Google Analytics give a great perspective on your our site’s reach, but lack the real time feel a simple widget like this can provide.
Requirements: PHP, MySQL, jQuery Framework
Demo: http://demo.tutorialzine.com/2010/03/who-is-online-widget…
License: License Free