Actually a subject

The site has a “pop-up” user subscription form, which I show in (due to the situation described below) during the second user’s visit (weed out through cookies). was shown when the user first logged. Tell me, please, how to track the bots, catch? Can users additionally check for cookies on other sites (for example, Vkontakte), in order to understand that this is not a PS bot?

    1 answer 1

    $bot_list = array ( 'Googlebot' => 'Корпорация добра' //и т.д. список ботов уже сами допишите ); foreach($bot_list as $bot_name => $search_engine) { if(strstr($_SERVER['HTTP_USER_AGENT'], $bot_name)) { echo $search_engine; //Тут выполняем свои действия с отловленным ботом } } 
    • one
      // Here we perform our actions with the captured bot, here I set the key for the condition. after updates I will look. Thank you Googlebot => Google, Aport => Aport robot, Google => Google, msnbot = MSN, Rambler => Rambler, Yahoo => 'Yahoo', 'IDBot' => 'ID-Search Bot', 'eStyle' => 'eStyle Bot', 'Mail.Ru' => 'Mail.Ru Bot', 'Scrubby' => 'Scrubby robot ',' Yandex '=>' Yandex ',' YaDirectBot '=>' Yandex Direct 'here is a small list of bots - KoVaLsKy