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 Mohammad Mostafa Shahreki  >  Visits  >  index.php  >  Download  
File: index.php
Role: Example script
Content type: text/plain
Description: Index
Class: Visits
Count site visitors using a MySQL database table
Author: By
Last change:
Date: 2011-04-10 01:17
Size: 958 bytes
 

Contents

Class file image Download
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<TITLE>Visits</TITLE>
</HEAD>
<BODY>
<?PHP
    
require_once('visits.php');
    
$visits = new Visits();
    
$visits->Count();
    echo 
'<B>Visits</B><BR/>'."\n";
    echo 
'Total&nbsp;'.$visits->GetAll().'<BR/>'."\n";
    echo 
'Today&nbsp;'.$visits->GetToday().'<BR/>'."\n";
    echo 
'Yesterday&nbsp;'.$visits->GetLastDay(1).'<BR/>'."\n";
    echo 
'The day before yesterday&nbsp;'.$visits->GetLastDay(2).'<BR/>'."\n";
    echo 
'Sum of 2 days ago&nbsp;'.$visits->GetLastDays(2).'<BR/>'."\n";
    echo 
'Last week&nbsp;'.$visits->GetLastDays(7).'<BR/>'."\n";
    echo 
'Last month&nbsp;'.$visits->GetLastDays(30).'<BR/>'."\n";
    echo 
'Last year&nbsp;'.$visits->GetLastDays(365).'<BR/>'."\n";
?>
</BODY>
</HTML>