If I set to only Google Bot; I can this setting with this code:
if(!strstr(strtolower($_SERVER['HTTP_USER_AGENT']), "googlebot"))
{
if($_SERVER["HTTP_CF_IPCOUNTRY"] =! 'USA')
{
echo "empty";
die();
}
}
But I want to add yandexbot and bingbot... How can i set?
I have made an array for you. It has your favourite bots like googlebot, yahoo and yandex. You can also add any extra useragent if you want by placing it in the Crawlerlist array within single quotes seperated by commas.
You can Get list of All available UserAgents here: http://www.useragentstring.com/pages/Crawlerlist/
I hope this helps you. This is my first answer in Stack Overflow.