View Full Version : page visiting code

07-09-2012, 12:48 PM
I am making a web site that www.ask-photos.com with some script using from this site . I want to create a digital page visit counting each month or total

Please help me :rolleyes::(
by Somakumaran

07-09-2012, 02:14 PM
Make an account with Google Analytics:


Link that account to SeeTheStats:


Follow guide to put it all together:


GA is a very good way to optimise your traffic flow, the data it collects is surprisingly detailed. With SeeTheStats, you can then make that information public and share it on your site.

07-10-2012, 12:17 AM
Or if you want to go very low tech, you could use a very simple PHP hit counter and in each page you want to use it, all you have to do is reference it using include:

include ("counter.php");

so the code within counter.php, will be:

$count_my_page = ("hitcounter.txt");
$hits = file($count_my_page);
$hits[0] ++;
$fp = fopen($count_my_page , "w");
fputs($fp , "$hits[0]");
echo $hits[0];

07-10-2012, 12:49 AM
Another low-tech method is to use a CGI script. You can make a decent hit-counter at http://www.digits.com They walk you through it step by step (There's only five steps or so) and then just copy-paste to code they give where you want it to be displayed.

07-10-2012, 03:06 AM
Just as a side note, are you trying to count the hits for inividual users? Or for all the hits to the site? The only reason I ask is because this thread is in the javascript forum.