GuppY Help Center, help online, documentation and tutorials

 
Search
 
Close
GuppY 5.02

telecharger.png

logo_nuxit_guppy.png
You are here :   Welcome » Add a visitor counter
 
Preview  Print...  Print this page...
Preview  Print...  Print this section...
FAQ GuppY <= 4.6.xx

In this menu you will find all the FAQs on earlier versions of GuppY.

 ↑  
FAQ GuppY v 5.01.xx

Here you will find FAQs on Guppy version 5.01.xx.

 ↑  
FAQ system

These FAQs address issues related to hosting and the system in general.

Documentation

In this box you will find documentation and tutorials

 ↑  
Legal

Here you will find important information regarding regulations and copyright

 ↑  
rss This article is available in the standard RSS format for publication on your website :
https://ghc.freeguppy.org/data/en-articles.xml

To add a visitor counter (number of time different visitors viewed the page), you need 2 files, one for the counter data, and the other to manage the visitors. You also need to add a few lines of php code to the sample.php file toincrement the counter.

> Find the following line :
include(CHEMIN."inc/includes.inc");

>Below this line add the following :
$­­­­­­­cpt = ReadCounter("compteur.dtb");
$­­­­­­­new = DejaVote("ipcompteur.dtb");
if ($­­­­­­­new[0] == false) ­{­ WriteCounter("compteur.dtb", ++$­­­­­­­cpt); }


Replace the name of the file "compteur.dtb" by the name of your data file.

Replace the name of the file "ipcompteur.dtb" by the name of your unique visitor history file.

Use the $­­­cpt variable to display the counter value (for example: echo $­­­cpt; )

Creation date : 26/10/2006 @ 16:04
Category : - Sample PHP
Page read 32926 times

You are here :   Welcome » Add a visitor counter
 
Preview  Print...  Print this page...
Preview  Print...  Print this section...
Visits

 1516778 visitors

 47 visitors online

Webmaster - Infos
Help

aide_help.png
On each page in admin, if you click on this icon, you get the online help page.

Site registered in the CNIL under agrément 1040387.
You have a right of access, modification, rectification and deletion
of the data according to the Computer law and Freedom (article 34) of January 6th, 1978.

 

The FreeGuppY.org hosting is provided by Nuxit.com our partner