View Full Version : how to create a counter on your web page?
how to create a counter on your web page?
deadmix
01-24-2015, 12:58 PM
Here is how :
Make a new php page and also a count.txt file with just 0 digit in it. Upload the count.txt file on your web server. Depending on server configuration you may need to change the permission for this file to 777 so it is writeable by the counter script that we are going to use. Now, lets do the actual PHP code.
<?php
$count = file_get_contents("count.txt");
$count = trim($count);
$count = $count + 1;
$fl = fopen("count.txt","w+");
fwrite($fl,$count);
fclose($fl);
?>
That'all, now you have a Text Counter on your website.
avvntech
02-10-2015, 04:17 AM
Hi deadmix,
thanks for sharing
daviddakarai
02-19-2015, 02:46 AM
Thanks for sharing
jollyindustury
02-19-2015, 05:20 AM
Here is how :
Make a new php page and also a count.txt file with just 0 digit in it. Upload the count.txt file on your web server. Depending on server configuration you may need to change the permission for this file to 777 so it is writeable by the counter script that we are going to use. Now, lets do the actual PHP code.
<?php
$count = file_get_contents("count.txt");
$count = trim($count);
$count = $count + 1;
$fl = fopen("count.txt","w+");
fwrite($fl,$count);
fclose($fl);
?>
That'all, now you have a Text Counter on your website.
Thanks for sharing
Olin Lamanna
02-23-2015, 08:33 AM
This can be a helpful steps for you: http://www.computerhope.com/issues/ch000054.htm. This can be very for you.
sigmaseo
07-11-2015, 06:47 AM
use tool for website counter ERP software development Gurgaon (http://www.sigmaseosolutions.com/)
netster
07-21-2015, 02:33 PM
I use Statcounter.com it's free.
Good Luck
harikri
08-04-2015, 09:25 AM
There are several traffic counters online for free. Google it to find good one.
robertmiker
08-07-2015, 03:29 AM
This code is really useful dear, I have also used it.
MitraVarghese
08-10-2015, 07:17 AM
Here is how :
Make a new php page and also a count.txt file with just 0 digit in it. Upload the count.txt file on your web server. Depending on server configuration you may need to change the permission for this file to 777 so it is writeable by the counter script that we are going to use. Now, lets do the actual PHP code.
<?php
$count = file_get_contents("count.txt");
$count = trim($count);
$count = $count + 1;
$fl = fopen("count.txt","w+");
fwrite($fl,$count);
fclose($fl);
?>
That'all, now you have a Text Counter on your website.
This post is really very helpful for creating a counter on your web page.
saiburi
08-11-2015, 02:32 AM
This can be a helpful steps for you: http://www.computerhope.com/issues/ch000054.htm. This can be very for you.
Thanks. Its really very informative.
You can find your counter code in hitstats
jane1
08-22-2015, 03:44 AM
There are many counter tools that are prepared for embedding its code in home page to count online visitors.
Powered by vBulletin® Version 4.2.4 Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.