PHP Classes

File: example1.php

Recommend this page to a friend!
  Classes of Giulio Bai   giCounter   example1.php   Download  
File: example1.php
Role: Example script
Content type: text/plain
Description: Example #1
Class: giCounter
Keep track of page visitors using text files
Author: By
Last change:
Date: 17 years ago
Size: 281 bytes
 

Contents

Class file image Download
<?php

include_once("giCounter.php");

$counter = new giCounter();

echo
$counter->get_counter(); // equal to $counter->process(1);

$counter->reset();

// new file
$counter->set_file("stat_file.txt");

$counter->get_counter(); // count in the file stat_file.txt

?>