StefanRSA Posted July 20, 2010 Share Posted July 20, 2010 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? Link to comment https://forums.phpfreaks.com/topic/208286-simple-page-view-counter-funny-behaviour/ Share on other sites More sharing options...
gwolgamott Posted July 20, 2010 Share Posted July 20, 2010 Perhaps spider bots... Just for s & g's you don't have a page that's dynamically run do you, I mean for example that gets hits multiple times instead of just once to display different results? Link to comment https://forums.phpfreaks.com/topic/208286-simple-page-view-counter-funny-behaviour/#findComment-1088582 Share on other sites More sharing options...
StefanRSA Posted July 20, 2010 Author Share Posted July 20, 2010 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... Link to comment https://forums.phpfreaks.com/topic/208286-simple-page-view-counter-funny-behaviour/#findComment-1088589 Share on other sites More sharing options...
gwolgamott Posted July 20, 2010 Share Posted July 20, 2010 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. Link to comment https://forums.phpfreaks.com/topic/208286-simple-page-view-counter-funny-behaviour/#findComment-1088594 Share on other sites More sharing options...
StefanRSA Posted July 20, 2010 Author Share Posted July 20, 2010 Will try that thanks Link to comment https://forums.phpfreaks.com/topic/208286-simple-page-view-counter-funny-behaviour/#findComment-1088598 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.