jimflack Posted April 13, 2009 Report Share Posted April 13, 2009 I get a lot of spider visits (thats good) shown at My FlackGenealogy site.I see on a couple of other discussion pages how to STOP the robots visiting (I dont want that) - but is there a way just to not show their visits - so I can see what real people are visiting.Any help appreciated.Jim Flack Quote Link to comment Share on other sites More sharing options...
Kenn Posted April 13, 2009 Report Share Posted April 13, 2009 An easy way would be to replace a single line of code in showlog.php echo "$line<br/>\n"; with the following if (!preg_match('/(googlebot|crawl)/', $line, $match)){ echo "$line<br/>\n";}where you separate each bot with | that means OR. So this statement says, if you find "googlebot" or "crawl" in the string then don't print it. You may add as many bots as you like. If the number becomes too large then I would create a database table to handle it; if the number is small just do it like this. Be sure to document this change outside of this file since it may be overwritten when TNG releases an update. Quote Link to comment Share on other sites More sharing options...
arnold Posted April 13, 2009 Report Share Posted April 13, 2009 I see on a couple of other discussion pages how to STOP the robots visiting (I don't want that) - but is there a way just to not show their visits - so I can see what real people are visiting.Jim,Yes.Go to Administration/Setup/Log Settings and enter the host names you want to exclude FROM APPEARING ON THE LOG in "Exclude Host Names." The spiders, bots, whatever, will continue to be able to visit your website; they just will not appear on your logs.Arnold+++++++++++++++++++++++The TNG help file states this:Exclude Host NamesBefore making any log entry, TNG will check this list. If the host of the visitor responsible for the potential log entry is on the list, no log entry will be made. Host names should be separated by commas (no spaces) and can consist of entire host names, IP addresses, or portions of either. For example, "googlebot" will block "crawler4.googlebot.com". Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.