I have been trying since morning to create a simple php total hits like sharemobile. But it not just working can anybody help me
Simple text hit counter
Collapse
X
-
lol thats easy
here is a tutorial.. it will count unique visit's (ip adresses)so it will only add 1 hit per unique ip visit
Simple PHP unique visitors counter | PHP programming/development tutorials | In obscuroLast edited by wapfuture; 03.03.10, 18:05.
-
just create today.txt and chmod this to 777.and then write these line into ur index page or wherever u want to show this counter.
$today= "1";
$fp = @fopen("today.txt", "a");
@fputs($fp, "$today");
@fclose($fp);
$stat_count = @filesize("today.txt");
echo "Total Visitor : $stat_count";
THATS IT.BE SURE TO CHMOD TO 777.
Comment
-
Originally posted by khan89 View Postjust create today.txt and chmod this to 777.and then write these line into ur index page or wherever u want to show this counter.
$today= "1";
$fp = @fopen("today.txt", "a");
@fputs($fp, "$today");
@fclose($fp);
$stat_count = @filesize("today.txt");
echo "Total Visitor : $stat_count";
THATS IT.BE SURE TO CHMOD TO 777.
Does not count unique visit's, i could click your index and use an auto refresher just to "bump" the hit counts up.
Comment
-
Originally posted by khan89 View Postjust create today.txt and chmod this to 777.and then write these line into ur index page or wherever u want to show this counter.
$today= "1";
$fp = @fopen("today.txt", "a");
@fputs($fp, "$today");
@fclose($fp);
$stat_count = @filesize("today.txt");
echo "Total Visitor : $stat_count";
THATS IT.BE SURE TO CHMOD TO 777.
Does not count unique visit's, i could click your index and use an auto refresher just to "bump" the hit counts up.
Comment
Comment