Ho una funzione sche scrive su file quando passano i vari bot:
Codice PHP:
if (strstr($_SERVER['HTTP_USER_AGENT'], 'Googlebot')){$bot='Googlebot';}
else if (strstr($_SERVER['HTTP_USER_AGENT'], 'Mediapartners')){$bot='Adsense';}
else if (strstr($_SERVER['HTTP_USER_AGENT'], 'Slurp')){$bot='Hot Bot';}
else if (strstr($_SERVER['HTTP_USER_AGENT'], 'ichiro')){$bot='ichiro';}
else if (strstr($_SERVER['HTTP_USER_AGENT'], 'msnbot')){$str_bot='Msn';}
else if (strstr($_SERVER['HTTP_USER_AGENT'], 'bingBot')){$str_bot='Bing';}
Il guaio è che funziona a dovere von googlebot o ichiro, ma fallisce se invece il bot è bingbot o msnbot.
A cosa può essere dovuto questo strano comportamento?
Grazie