mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-01 16:22:41 +09:00
isCrawler, 관리자페이지 IP잠금, 사이트잠금 기능에서 ipfilter를 사용하도록 변경
This commit is contained in:
parent
98d3408919
commit
5fae27d53c
11 changed files with 85 additions and 67 deletions
|
|
@ -1318,7 +1318,7 @@ function isCrawler($agent = NULL)
|
|||
|
||||
$check_agent = array('bot', 'spider', 'google', 'yahoo', 'daum', 'teoma', 'fish', 'hanrss', 'facebook');
|
||||
$check_ip = array(
|
||||
'211.245.21.11*' /* mixsh */
|
||||
'211.245.21.110-211.245.21.119' /* mixsh */
|
||||
);
|
||||
|
||||
foreach($check_agent as $str)
|
||||
|
|
@ -1329,17 +1329,7 @@ function isCrawler($agent = NULL)
|
|||
}
|
||||
}
|
||||
|
||||
$check_ip = '/^(' . implode($check_ip, '|') . ')/';
|
||||
$check_ip = str_replace('.', '\.', $check_ip);
|
||||
$check_ip = str_replace('*', '.+', $check_ip);
|
||||
$check_ip = str_replace('?', '.?', $check_ip);
|
||||
|
||||
if(preg_match($check_ip, $_SERVER['REMOTE_ADDR'], $matches))
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return IpFilter::filter($check_ip, '211.245.21.113');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue