PHP Classes
Icontem

File: example.php


  Search   All class groups All class groups   Latest entries Latest entries   Top 10 charts Top 10 charts   Newsletter Newsletter   Blog Blog   Forums Forums   Help FAQ Help FAQ  
  Login   Register  
Recommend this page to a friend! ReTweet ReTweet Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Protung Dragos  >  Time Online  >  example.php  
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
 

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)


?>

 
  Advertise on this site Advertise on this site   Site map Site map   Statistics Statistics   Site tips Site tips   Privacy policy Privacy policy   Contact Contact  

For more information send a message to :
info at phpclasses dot org.
Copyright (c) Icontem 1999-2009 PHP Classes - PHP Class Scripts
  PHP Book Reviews - Reviews of books and other products