PHP-Web-Stat Support Forum
https://www.php-web-statistik.de/cgi-bin/yabb/YaBB.pl
Board (English) >> English board >> Apple bot does not appear in the list
https://www.php-web-statistik.de/cgi-bin/yabb/YaBB.pl?num=1705954177

Beitrag begonnen von Sandro kensan am 22.01.24 um 21:09:37

Titel: Apple bot does not appear in the list
Beitrag von Sandro kensan am 22.01.24 um 21:09:37
I downloaded version 20 of PHPWebStat a week ago and noticed that there are too many accesses to my site from .us domains. So I added a few lines of code in pws.php to track the ones that looked like bots to me:


Code (php):
if ( $js_referer == "" && $country == "us") {
  $domain_name = trim(gethostbyaddr($ip_address)); 
  file_put_contents("bot.txt", date("H:i:s d/m/Y",$time_stamp)." * ".$ip_address." * ".$country." *".$js_referer."* $domain_name\n", FILE_APPEND);
  exit;
}


The file was populated with entries with $domain_name containing the string:
Applebot
which I promptly added to:
Advance Setting > Exclude Bots (Searchengines)
solving the problem of the large number of accesses from the USA.
Surprisingly, the Apple bot does not appear in the list of bots.

PHP-Web-Stat Support Forum » Powered by YaBB 2.5.2!
YaBB Forum Software © 2000-2012. Alle Rechte vorbehalten.