예전에 한번 올린 팁인데 로봇쪽을 업데이트 해서 다시 올려봅니다.
/lib/visit.lib.php의 os부분을 아래걸로 교체해주시면 됩니다.
=====================================================================
function get_os($agent)
{
$agent = strtolower($agent);
//echo $agent; echo "<br/>";
if (preg_match("/windows 98/", $agent)) { $s = "98"; }
else if(preg_match("/iphone/", $agent)) { $s = "iPhone"; } //iPhone
else if(preg_match("/ipad/", $agent)) { $s = "iPad"; } //iPad
else if(preg_match("/ipod/", $agent)) { $s = "iPod"; } //iPod
else if(preg_match("/android/", $agent)) { $s = "Android"; } //Android
else if(preg_match("/psp/", $agent)) { $s = "PSP"; } //PSP
else if(preg_match("/playstation/", $agent)) { $s = "PLAYSTATION"; } //PLAYSTATION
else if(preg_match("/berry/", $agent)) { $s = "BlackBerry"; } //BlackBerry
else if(preg_match("/symbian/", $agent)) { $s = "Symbian"; } //Symbian
else if(preg_match("/ericsson/", $agent)) { $s = "SonyEricsson"; } //SonyEricsson
else if(preg_match("/nokia/", $agent)) { $s = "Nokia"; } //Nokia
else if(preg_match("/benq/", $agent)) { $s = "BenQ"; } //BenQ
else if(preg_match("/mot/", $agent)) { $s = "Motorola"; } //Motorola
else if(preg_match("/nintendo/", $agent)) { $s = "Nintendo"; } //Nintendo
else if(preg_match("/palm/", $agent)) { $s = "Palm"; } //Palm
else if(preg_match("/sch/", $agent)) { $s = "T*옴니아"; } //T*옴니아
else if(preg_match("/sph/", $agent)) { $s = "애니콜"; } //삼성폰
else if(preg_match("/sgh/", $agent)) { $s = "옴니아"; } //옴니아
else if(preg_match("/sch/", $agent)) { $s = "T*옴니아"; } //T*옴니아
else if(preg_match("/im-s/", $agent)) { $s = "스카이폰"; } //스카이폰
else if(preg_match("/lg/", $agent)) { $s = "LG 사이언"; } //LG 사이언
else if(preg_match("/googleproducer|google web preview/", $agent)) { $s = "Google Web Preview"; } //Google Web Preview and Feedfetcher
else if(preg_match("/google-site-verification/", $agent)) { $s = "Google Webmaster tools"; } //Google Webmaster tools
else if(preg_match("/feedfetcher-google/", $agent)) { $s = "Feedfetcher-Google"; } //Feedfetcher-Google
else if(preg_match("/desktop google reader/", $agent)) { $s = "Desktop Google Reader"; } //Desktop Google Reader
else if(preg_match("/appengine-google/", $agent)) { $s = "AppEngine-Google"; } //AppEngine-Google
else if(preg_match("/google wireless transcoder/", $agent)) { $s = "Google Wireless Transcoder"; } //Google Wireless Transcoder
else if(preg_match("/google/", $agent)) { $s = "Google Robot"; } //구글로봇
else if(preg_match("/mediapartners/", $agent)) { $s = "Google AdSense"; } //구글애드센스
else if(preg_match("/-mobile/", $agent)) { $s = "Google-Mobile Robot"; } //구글모바일로봇
else if(preg_match("/naver blog/", $agent)) { $s = "NAVER Blog Rssbot"; } //네이버블로그로봇
else if(preg_match("/naver|yeti/", $agent)) { $s = "NAVER Robot"; } //네이버로봇
else if(preg_match("/daumsearch/", $agent)) { $s = "DaumSearch validator"; } //다음검색 검사기
else if(preg_match("/daum/", $agent)) { $s = "DAUM Robot"; } //다음로봇
else if(preg_match("/yahooysmcm/", $agent)) { $s = "YahooYSMcm"; } //야후!문맥광고
else if(preg_match("/yahoocachesystem/", $agent)) { $s = "YahooCacheSystem"; } //야후!캐싱시스템
else if(preg_match("/yahoo/", $agent)) { $s = "Yahoo! Robot"; } //야후!로봇
else if(preg_match("/natefeedfetcher/", $agent)) { $s = "NATEFeed Fetcher"; } //네이트FeedFetcher
else if(preg_match("/egloosfeedfetcher/", $agent)) { $s = "Egloos FeedFetcher"; } //이글루스FeedFetcher
else if(preg_match("/empas|nate/", $agent)) { $s = "NATE Robot"; } //네이트로봇
else if(preg_match("/bingpreview/", $agent)) { $s = "BingPreview"; } //BingPreview로봇
else if(preg_match("/bing/", $agent)) { $s = "Bing Robot"; } //Bing로봇
else if(preg_match("/msn/", $agent)) { $s = "MSN Robot"; } //MSN로봇
else if(preg_match("/zum/", $agent)) { $s = "Zum Robot"; } //Zum로봇
else if(preg_match("/qrobot/", $agent)) { $s = "Qrobot"; } //Qrobot로봇
else if(preg_match("/archive|ia_archiver/", $agent)){ $s = "Archive Robot"; } //아카이브로봇
else if(preg_match("/twitter/", $agent)) { $s = "Twitter Robot"; } //Twitter로봇
else if(preg_match("/facebook/", $agent)) { $s = "Facebook Robot"; } //Facebook로봇
else if(preg_match("/whois/", $agent)) { $s = "Whois Search Robot"; } //Whois Search로봇
else if(preg_match("/checkprivacy/", $agent)) { $s = "KISA"; } //한국인터넷진흥원
else if(preg_match("/mj12/", $agent)) { $s = "MJ12bot"; } //MJ12bot
else if(preg_match("/baidu/", $agent)) { $s = "Baiduspider"; } //Baiduspider
else if(preg_match("/yandex/", $agent)) { $s = "YandexBot"; } //YandexBot로봇
else if(preg_match("/Sogou/", $agent)) { $s = "Sogou web spider"; } //Sogou로봇
else if(preg_match("/tweetedtimes/", $agent)) { $s = "TweetedTimes Bot"; } //TweetedTimes Bot
else if(preg_match("/discobot/", $agent)) { $s = "Discoveryengine Robot"; } //Discoveryengine로봇
else if(preg_match("/twiceler/", $agent)) { $s = "Twiceler Robot"; } //Twiceler로봇
else if(preg_match("/ezooms/", $agent)) { $s = "Ezooms Robot"; } //Ezooms로봇
else if(preg_match("/wbsearch/", $agent)) { $s = "WBSearchBot"; } //WBSearchBot
else if(preg_match("/proximic/", $agent)) { $s = "proximic"; } //proximic로봇
else if(preg_match("/GTWek/", $agent)) { $s = "GTWek"; } //GTWek로봇
else if(preg_match("/java|python|axel|dalvik|greatnews|hmschnl|huawei|jakarta|netcraft|parrotsite|readability|unwind|pagepeeker|shunix|crystalsemantics|turnitin|komodia|siteIntel|apercite/", $agent)) { $s = "Unknown Robot"; } //Unknown로봇
else if(preg_match("/cron/", $agent)) { $s = "WebCron"; } //WebCron
else if(preg_match("/capture/", $agent)) { $s = "WebCapture"; } //WebCapture로봇
else if(preg_match("/w3c/", $agent)) { $s = "W3C Validator"; } //W3C Validator
else if(preg_match("/wget/", $agent)) { $s = "Wget Validator"; } //Wget
else if(preg_match("/fetcher/", $agent)) { $s = "Feed Fetcher"; } //Feed Fetcher
else if(preg_match("/feed|reader|rss/", $agent)) { $s = "Feed Reader"; } //Feed Reader
else if(preg_match("/bot|slurp|scrap|spider|crawl|curl/", $agent)) { $s = "Robot"; }
else if(preg_match("/docomo/", $agent)) { $s = "DoCoMo"; } //DoCoMo
else if(preg_match("/windows 95/", $agent)) { $s = "95"; }
else if(preg_match("/windows nt 4\.[0-9]*/", $agent)) { $s = "NT"; }
else if(preg_match("/windows nt 5\.0/", $agent)) { $s = "2000"; }
else if(preg_match("/windows nt 5\.1/", $agent)) { $s = "XP"; }
else if(preg_match("/windows nt 5\.2/", $agent)) { $s = "2003"; }
else if(preg_match("/windows nt 6\.0/", $agent)) { $s = "Vista"; }
else if(preg_match("/windows nt 6\.1/", $agent)) { $s = "Windows7"; }
else if(preg_match("/windows nt 6\.2/", $agent)) { $s = "Windows8"; }
else if(preg_match("/windows 9x/", $agent)) { $s = "ME"; }
else if(preg_match("/windows ce/", $agent)) { $s = "CE"; }
else if(preg_match("/linux/", $agent)) { $s = "Linux"; }
else if(preg_match("/sunos/", $agent)) { $s = "sunOS"; }
else if(preg_match("/irix/", $agent)) { $s = "IRIX"; }
else if(preg_match("/phone|skt|lge|0450/", $agent)) { $s = "Mobile"; }
else if(preg_match("/internet explorer/", $agent)) { $s = "IE"; }
else if(preg_match("/mozilla/", $agent)) { $s = "Mozilla"; }
else if(preg_match("/macintosh/", $agent)) { $s = "Mac"; }
else { $s = "기타"; }
return $s;
}
=====================================================================
g4_visit 테이블 보고 접속 하는 잡다한 로봇을 전부 넣어봤습니다.
네이버,구글,다음,네이트,야후,빙 아카이브 외에는 전부 차단하고 있는데도 저만큼이나 로그가 남다니...
외국봇 중에 robots.txt 규약 안지키는게 많은 듯.
2012년 3월 25일 업데이트
/lib/visit.lib.php의 os부분을 아래걸로 교체해주시면 됩니다.
=====================================================================
function get_os($agent)
{
$agent = strtolower($agent);
//echo $agent; echo "<br/>";
if (preg_match("/windows 98/", $agent)) { $s = "98"; }
else if(preg_match("/iphone/", $agent)) { $s = "iPhone"; } //iPhone
else if(preg_match("/ipad/", $agent)) { $s = "iPad"; } //iPad
else if(preg_match("/ipod/", $agent)) { $s = "iPod"; } //iPod
else if(preg_match("/android/", $agent)) { $s = "Android"; } //Android
else if(preg_match("/psp/", $agent)) { $s = "PSP"; } //PSP
else if(preg_match("/playstation/", $agent)) { $s = "PLAYSTATION"; } //PLAYSTATION
else if(preg_match("/berry/", $agent)) { $s = "BlackBerry"; } //BlackBerry
else if(preg_match("/symbian/", $agent)) { $s = "Symbian"; } //Symbian
else if(preg_match("/ericsson/", $agent)) { $s = "SonyEricsson"; } //SonyEricsson
else if(preg_match("/nokia/", $agent)) { $s = "Nokia"; } //Nokia
else if(preg_match("/benq/", $agent)) { $s = "BenQ"; } //BenQ
else if(preg_match("/mot/", $agent)) { $s = "Motorola"; } //Motorola
else if(preg_match("/nintendo/", $agent)) { $s = "Nintendo"; } //Nintendo
else if(preg_match("/palm/", $agent)) { $s = "Palm"; } //Palm
else if(preg_match("/sch/", $agent)) { $s = "T*옴니아"; } //T*옴니아
else if(preg_match("/sph/", $agent)) { $s = "애니콜"; } //삼성폰
else if(preg_match("/sgh/", $agent)) { $s = "옴니아"; } //옴니아
else if(preg_match("/sch/", $agent)) { $s = "T*옴니아"; } //T*옴니아
else if(preg_match("/im-s/", $agent)) { $s = "스카이폰"; } //스카이폰
else if(preg_match("/lg/", $agent)) { $s = "LG 사이언"; } //LG 사이언
else if(preg_match("/googleproducer|google web preview/", $agent)) { $s = "Google Web Preview"; } //Google Web Preview and Feedfetcher
else if(preg_match("/google-site-verification/", $agent)) { $s = "Google Webmaster tools"; } //Google Webmaster tools
else if(preg_match("/feedfetcher-google/", $agent)) { $s = "Feedfetcher-Google"; } //Feedfetcher-Google
else if(preg_match("/desktop google reader/", $agent)) { $s = "Desktop Google Reader"; } //Desktop Google Reader
else if(preg_match("/appengine-google/", $agent)) { $s = "AppEngine-Google"; } //AppEngine-Google
else if(preg_match("/google wireless transcoder/", $agent)) { $s = "Google Wireless Transcoder"; } //Google Wireless Transcoder
else if(preg_match("/google/", $agent)) { $s = "Google Robot"; } //구글로봇
else if(preg_match("/mediapartners/", $agent)) { $s = "Google AdSense"; } //구글애드센스
else if(preg_match("/-mobile/", $agent)) { $s = "Google-Mobile Robot"; } //구글모바일로봇
else if(preg_match("/naver blog/", $agent)) { $s = "NAVER Blog Rssbot"; } //네이버블로그로봇
else if(preg_match("/naver|yeti/", $agent)) { $s = "NAVER Robot"; } //네이버로봇
else if(preg_match("/daumsearch/", $agent)) { $s = "DaumSearch validator"; } //다음검색 검사기
else if(preg_match("/daum/", $agent)) { $s = "DAUM Robot"; } //다음로봇
else if(preg_match("/yahooysmcm/", $agent)) { $s = "YahooYSMcm"; } //야후!문맥광고
else if(preg_match("/yahoocachesystem/", $agent)) { $s = "YahooCacheSystem"; } //야후!캐싱시스템
else if(preg_match("/yahoo/", $agent)) { $s = "Yahoo! Robot"; } //야후!로봇
else if(preg_match("/natefeedfetcher/", $agent)) { $s = "NATEFeed Fetcher"; } //네이트FeedFetcher
else if(preg_match("/egloosfeedfetcher/", $agent)) { $s = "Egloos FeedFetcher"; } //이글루스FeedFetcher
else if(preg_match("/empas|nate/", $agent)) { $s = "NATE Robot"; } //네이트로봇
else if(preg_match("/bingpreview/", $agent)) { $s = "BingPreview"; } //BingPreview로봇
else if(preg_match("/bing/", $agent)) { $s = "Bing Robot"; } //Bing로봇
else if(preg_match("/msn/", $agent)) { $s = "MSN Robot"; } //MSN로봇
else if(preg_match("/zum/", $agent)) { $s = "Zum Robot"; } //Zum로봇
else if(preg_match("/qrobot/", $agent)) { $s = "Qrobot"; } //Qrobot로봇
else if(preg_match("/archive|ia_archiver/", $agent)){ $s = "Archive Robot"; } //아카이브로봇
else if(preg_match("/twitter/", $agent)) { $s = "Twitter Robot"; } //Twitter로봇
else if(preg_match("/facebook/", $agent)) { $s = "Facebook Robot"; } //Facebook로봇
else if(preg_match("/whois/", $agent)) { $s = "Whois Search Robot"; } //Whois Search로봇
else if(preg_match("/checkprivacy/", $agent)) { $s = "KISA"; } //한국인터넷진흥원
else if(preg_match("/mj12/", $agent)) { $s = "MJ12bot"; } //MJ12bot
else if(preg_match("/baidu/", $agent)) { $s = "Baiduspider"; } //Baiduspider
else if(preg_match("/yandex/", $agent)) { $s = "YandexBot"; } //YandexBot로봇
else if(preg_match("/Sogou/", $agent)) { $s = "Sogou web spider"; } //Sogou로봇
else if(preg_match("/tweetedtimes/", $agent)) { $s = "TweetedTimes Bot"; } //TweetedTimes Bot
else if(preg_match("/discobot/", $agent)) { $s = "Discoveryengine Robot"; } //Discoveryengine로봇
else if(preg_match("/twiceler/", $agent)) { $s = "Twiceler Robot"; } //Twiceler로봇
else if(preg_match("/ezooms/", $agent)) { $s = "Ezooms Robot"; } //Ezooms로봇
else if(preg_match("/wbsearch/", $agent)) { $s = "WBSearchBot"; } //WBSearchBot
else if(preg_match("/proximic/", $agent)) { $s = "proximic"; } //proximic로봇
else if(preg_match("/GTWek/", $agent)) { $s = "GTWek"; } //GTWek로봇
else if(preg_match("/java|python|axel|dalvik|greatnews|hmschnl|huawei|jakarta|netcraft|parrotsite|readability|unwind|pagepeeker|shunix|crystalsemantics|turnitin|komodia|siteIntel|apercite/", $agent)) { $s = "Unknown Robot"; } //Unknown로봇
else if(preg_match("/cron/", $agent)) { $s = "WebCron"; } //WebCron
else if(preg_match("/capture/", $agent)) { $s = "WebCapture"; } //WebCapture로봇
else if(preg_match("/w3c/", $agent)) { $s = "W3C Validator"; } //W3C Validator
else if(preg_match("/wget/", $agent)) { $s = "Wget Validator"; } //Wget
else if(preg_match("/fetcher/", $agent)) { $s = "Feed Fetcher"; } //Feed Fetcher
else if(preg_match("/feed|reader|rss/", $agent)) { $s = "Feed Reader"; } //Feed Reader
else if(preg_match("/bot|slurp|scrap|spider|crawl|curl/", $agent)) { $s = "Robot"; }
else if(preg_match("/docomo/", $agent)) { $s = "DoCoMo"; } //DoCoMo
else if(preg_match("/windows 95/", $agent)) { $s = "95"; }
else if(preg_match("/windows nt 4\.[0-9]*/", $agent)) { $s = "NT"; }
else if(preg_match("/windows nt 5\.0/", $agent)) { $s = "2000"; }
else if(preg_match("/windows nt 5\.1/", $agent)) { $s = "XP"; }
else if(preg_match("/windows nt 5\.2/", $agent)) { $s = "2003"; }
else if(preg_match("/windows nt 6\.0/", $agent)) { $s = "Vista"; }
else if(preg_match("/windows nt 6\.1/", $agent)) { $s = "Windows7"; }
else if(preg_match("/windows nt 6\.2/", $agent)) { $s = "Windows8"; }
else if(preg_match("/windows 9x/", $agent)) { $s = "ME"; }
else if(preg_match("/windows ce/", $agent)) { $s = "CE"; }
else if(preg_match("/linux/", $agent)) { $s = "Linux"; }
else if(preg_match("/sunos/", $agent)) { $s = "sunOS"; }
else if(preg_match("/irix/", $agent)) { $s = "IRIX"; }
else if(preg_match("/phone|skt|lge|0450/", $agent)) { $s = "Mobile"; }
else if(preg_match("/internet explorer/", $agent)) { $s = "IE"; }
else if(preg_match("/mozilla/", $agent)) { $s = "Mozilla"; }
else if(preg_match("/macintosh/", $agent)) { $s = "Mac"; }
else { $s = "기타"; }
return $s;
}
=====================================================================
g4_visit 테이블 보고 접속 하는 잡다한 로봇을 전부 넣어봤습니다.
네이버,구글,다음,네이트,야후,빙 아카이브 외에는 전부 차단하고 있는데도 저만큼이나 로그가 남다니...
외국봇 중에 robots.txt 규약 안지키는게 많은 듯.
2012년 3월 25일 업데이트
댓글 16개
게시글 목록
| 번호 | 제목 |
|---|---|
| 34021 | |
| 33994 | |
| 33922 | |
| 33895 | |
| 33889 | |
| 33882 | |
| 33868 |
최신글
최신글 함수 개량
11
|
| 33863 | |
| 33859 | |
| 33857 | |
| 33849 | |
| 33842 | |
| 33835 | |
| 33830 | |
| 33828 | |
| 33807 | |
| 33797 | |
| 33796 | |
| 33791 | |
| 33786 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기