View unanswered posts | View active topics It is currently Tue Nov 20, 2018 8:18 am

Reply to topic  [ 1 post ] 
 PHP tutorial: Visitor counter 
Author Message
Junior Member

Joined: Sun Sep 13, 2009 4:08 pm
Posts: 54
Location: United States Of America
Post PHP tutorial: Visitor counter
This is a simple PHP visitor counter, must have a text file called count.txt
And displays the number: 0.

$single = "(s)";

$file = file_get_contents("count.txt");
$visitors = $file;

$visitorsnew = $visitors + 1;

$filenew = fopen("count.txt","w");

echo "You've had $visitorsnew visitor$single.";[/PHP]

There you go :) Enjoy.

Sun Nov 01, 2009 9:05 am
Report this post
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: No registered users and 0 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
© Copyright 2003-2008 The ultimate PHP Editor and PHP IDE site.