PHP Classes

User online and hits: Keep track of site visitors and page hits in MySQL

Recommend this page to a friend!
  Info   View files Example   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 997 All time: 3,654 This week: 660Up
Version License PHP version Categories
visitor_on_line 1.0GNU Free Document...5.0PHP 5, Statistics, User Management
Description 

Author

This package can be used to keep track of site visitors and page hits in a MySQL database.

It is based on the original package named Online Visitors Count written by Alfredo Sanchez.

This version was updated to use PHP 5 syntax and also to keep track of the pages that each visitor accesses.

Picture of kalo
Name: kalo <contact>
Classes: 1 package by
Country: Morocco Morocco
Age: 47
All time rank: 23685 in Morocco Morocco
Week rank: 258 Up4 in Morocco Morocco Up

Example

<?php

   
require_once("configuration.php");
    require_once(
"class.database.php");
    require_once(
"class.visitors.php");
   
   
$visitor = new visitors();
   
// display online users, no parameters
   
echo $visitor->display();
   
   
// display hits
   
echo $visitor->display(1);
   
   
// display online users, same as without parameters
   
echo $visitor->display(2);

?>



  Files folder image Files  
File Role Description
Plain text file class.database.php Class database connexion
Plain text file class.visitors.php Class user online and hits
Accessible without login Plain text file configuration.php Conf. configuration
Accessible without login Plain text file example.php Example simple exemple

 Version Control Unique User Downloads Download Rankings  
 0%
Total:997
This week:0
All time:3,654
This week:660Up