Jump to content

Simple Page view counter - Funny behaviour


StefanRSA

Recommended Posts

Hi,

 

I have a simple page view counter (Not IP logged) that counts page views. It works as follow:

$visited=$adresult['publicview'];
$newvisited=$visited+1;

 

And the last script on my page is:

if ($userid != $user){
$do = mysql_query("UPDATE ads SET publicview='$newvisited' WHERE id='$adkey' AND catid = '$catkey' AND subcatid='$subcatkey' LIMIT 1") or die(mysql_error());
}

 

Now... after a few months I am looking at these "pageviews" and found that some of them is out of porportion high??? Some pages show a total of 4450 pageviews in 1 month???

 

Except for someone refreshing all the time (What a bore) what else can influence this counter? Search engine spiders?

Hi gwolgamott,

 

No this is the end result page what the visitors see... No other script is calling this page unless it is asked for via web... Damn... If spiders does this how should I then go about to not allow them to run the script?

 

I mean... This is a simple lookup on page display and updating the db is the last thing that happens on this page...

Ok that's what I assumed but figured to ask just in case. So if absolutely sure it's not a coding error then do something like log ip addresses for a small stint just to see who is hitting those pages heavily.

Then use http://ip-lookup.net/ to see where it's coming from and who owns that ip. Could help to determine if it is bots or somebody who just visits the page endlessly for some screwy or malicious reason.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.