mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-17 17:32:15 +09:00
크롤러를 조금 더 확인해줍니다.
isCrawler 함수에 크롤러의 UA에만 사용되는 문구를 조금 더 추가한 PR 입니다. 함수를 잘 살펴보시면, ip 대역으로도 구분할 수 있습니다. 참고 하시기 바랍니다. ip로 필터링 할 때, 걱정되는 것은, 크롤러가 돌아가는 ip에서 크롤링 외의 목적으로 접근할 수도 있지 않을까 하는 것입니다.
This commit is contained in:
parent
c5893358d5
commit
033f771cd4
1 changed files with 1 additions and 1 deletions
|
|
@ -1487,7 +1487,7 @@ function isCrawler($agent = NULL)
|
|||
$agent = $_SERVER['HTTP_USER_AGENT'];
|
||||
}
|
||||
|
||||
$check_agent = array('bot', 'spider', 'google', 'yahoo', 'daum', 'teoma', 'fish', 'hanrss', 'facebook');
|
||||
$check_agent = array('bot', 'spider', 'spyder', 'crawl', 'http://', 'google', 'yahoo', 'slurp', 'yeti', 'daum', 'teoma', 'fish', 'hanrss', 'facebook', 'yandex', 'infoseek', 'stackrambler');
|
||||
$check_ip = array(
|
||||
'211.245.21.110-211.245.21.119' /* mixsh */
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue