How it works...
The plugin uses AJAX to capture the users online. On every page request, the plugin sends an AJAX request to check whether the requester is a guest, member, or bot. After removing the requests from bots, the plugin saves the details of the user, request, and timestamp in a custom database table called wp_useronline.
The identification of online users is done by the combination of the last requested timestamp and a customizable time interval. The default time interval is set to 300 seconds. In each request, the plugin checks if the difference in the timestamp value and the current time exceeds 300 seconds. In such cases, the user will be removed from the wp_useronline table, and hence will not be considered as an online user. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access