함수 is bot()


개요

함수 is_bot()

PHP

function is_bot() {
	$agent = $_SERVER['HTTP_USER_AGENT'];
	if( strpos($agent,'Googlebot') !== false ) return true; // 구글
	if( strpos($agent,'bingbot') !== false ) return true; // 빙
	if( strpos($agent,'Daum') !== false ) return true; // 다음
	if( strpos($agent,'Yeti') !== false ) return true; // 네이버
	return false;
}