Mailinglisten-Archive |
Hi
>Nur: Wie checke ich, ob einer der Bots im Array identisch mit dem
>$HTTP_USER_AGENT ist?
>
>if ($HTTP_USER_AGENT == $spambots){ geht ja wohl nicht.
Versuch's mal so:
for($i=0;$i<count($spambots);$i++)
if(getenv("HTTP_USER_AGENT") == $spambots[$i])
header ("Location: http://www.microsoft.com");
oder so:
while (list($id,$bot) = each($spambots))
if(getenv("HTTP_USER_AGENT") == $bot)
header ("Location: http://www.microsoft.com");
bye
Daniel
php::bar PHP Wiki - Listenarchive