PHP Classes

File: sample.php

Recommend this page to a friend!
  Classes of Alfredo Sanchez   Online Visitors Count   sample.php   Download  
File: sample.php
Role: Example script
Content type: text/plain
Description: Sample Code
Class: Online Visitors Count
Keep track of the current site number of visitors
Author: By
Last change: Added database wrapper and a configuration file
Date: 14 years ago
Size: 392 bytes


Class file image Download

$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);