PHP Classes

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

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 997 All time: 3,655 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: 23695 in Morocco Morocco
Week rank: 200 Up3 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 (4)  
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

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:997
This week:0
All time:3,655
This week:660Up