Login   Register  
PHP Classes
elePHPant
Icontem

File: index.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Jon Pulice  >  JPCounterClass  >  index.php  >  Download  
File: index.php
Role: Example script
Content type: text/plain
Description: Example Of Display
Class: JPCounterClass
Count the accesses to a site using MySQL tables
Author: By
Last change:
Date: 9 years ago
Size: 1,036 bytes
 

Contents

Class file image Download
<?php

include "class.php"//include the file, everything set up already

$cnt->Hit($_SERVER); //add a hit!, make sure to put $_SERVER as the param, or IT WONT WORK!
 
echo "Total Count: " $cnt->Total();                            echo "<br>";
echo 
"This Page Count: " $cnt->Page();                         echo "<br>";
echo 
"Today Count: " $cnt->Today();                             echo "<br>";
echo 
"Today Page Count: " $cnt->TodayPage();                     echo "<br>";
echo 
"2-Day Count: " $cnt->Days(2);                             echo "<br>";
echo 
"2-Day Page Count: " $cnt->DaysPage(2);                     echo "<hr>";

//Unique is done by IP address
echo "Unique Count: " $cnt->UniqueTotal();                     echo "<br>";
echo 
"Unique Page Count: " $cnt->UniquePage();                 echo "<br>";
echo 
"Unique Today Count: " $cnt->UniqueToday();                 echo "<br>";
echo 
"Unique Today Page Count: " $cnt->UniqueTodayPage();     echo "<br>";
echo 
"Unique 2-Day Count: " $cnt->UniqueDays(2);                 echo "<br>";
echo 
"Unique 2-Day Page Count: " $cnt->UniqueDaysPage(2);     echo "<hr>";

echo 
$cnt->AddImage(rand(1,7));

?>