PHP Classes

File: About.txt

Recommend this page to a friend!
  Classes of Mohammad Mostafa Shahreki   Visits   About.txt   Download  
File: About.txt
Role: Documentation
Content type: text/plain
Description: About
Class: Visits
Count site visitors using a MySQL database table
Author: By
Last change: Correcting the description
Date: 12 years ago
Size: 764 bytes


Class file image Download
Usage: 1- Import 'visits.sql' in your DB using "phpmyadmin". 2- Include/Require 'visits.php' once in any script you want to use this class in. 3- List of functions: A) Count Increments the count of today visits (creates a record for today if not found). If not called, the number of today visits will not be increased and you can use the rest of functions to collect the stats. B) GetAll Returns total visits. C) GetLastDays Returns sum of the visits of previous days (number of days is the parameter). D) GetLastDay Returns the exact visits of the specified day ago (difference of day is the parameter). E) GetToday Works like GetLastDays(0) and GetLastDay(0) and returns today visits (Just added for convenience). Hopes to be useful.