Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Protung Dragos  >  Time Online  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Time Online
Keep track of the time users spend in a site
Author: By
Last change: Added more comments
Date: 10 years ago
Size: 859 bytes
 

Contents

Class file image Download
<?php

include ("time_online.class.php");


$test = new time_online;

echo 
"<br> Curent time on page: ";
$test -> display_time("current_page"); // will display the time the user spent on the current page (dinamyc)

echo "<br> Curent time on site: ";
$test -> display_time("current_session"); // will display the time the user spent on the site on current session (dinamyc)

echo "<br> Total time on site: ";
$test -> display_time("total_time"); // will display the time the user spent on the site from all the visits (dinamyc)

echo "<br> Curent time on site: ";
print_r($test -> userTO); // display the array with the time the user spent on the site iin current session (static)

echo "<br> Total time on site: ";
print_r($test -> userTT); // display the array with the time the user spent on the site from all the visits (static)


?>