本文整理汇总了PHP中AIOWPSecurity_Utility::check_locked_ip方法的典型用法代码示例。如果您正苦于以下问题:PHP AIOWPSecurity_Utility::check_locked_ip方法的具体用法?PHP AIOWPSecurity_Utility::check_locked_ip怎么用?PHP AIOWPSecurity_Utility::check_locked_ip使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AIOWPSecurity_Utility
的用法示例。
在下文中一共展示了AIOWPSecurity_Utility::check_locked_ip方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: column_status
function column_status($item)
{
$ip = $item['ip_or_host'];
//Check if this IP address is locked
$is_locked = AIOWPSecurity_Utility::check_locked_ip($ip);
if ($is_locked) {
return 'temporarily blocked';
} else {
return '';
}
}
示例2: column_status
function column_status($item)
{
global $aio_wp_security;
$ip = $item['ip_or_host'];
//Check if this IP address is locked
$is_locked = AIOWPSecurity_Utility::check_locked_ip($ip);
$blacklisted_string = $aio_wp_security->configs->get_value('aiowps_banned_ip_addresses');
$banned = strpos($blacklisted_string, $ip);
if ($banned !== false) {
return 'blacklisted';
} else {
if ($is_locked) {
return 'temporarily blocked';
} else {
return '';
}
}
}
示例3: do_404_lockout_tasks
function do_404_lockout_tasks()
{
global $aio_wp_security;
$redirect_url = $aio_wp_security->configs->get_value('aiowps_404_lock_redirect_url');
//This is the redirect URL for blocked users
$visitor_ip = AIOWPSecurity_Utility_IP::get_user_ip_address();
$is_locked = AIOWPSecurity_Utility::check_locked_ip($visitor_ip);
if ($is_locked) {
//redirect blocked user to configured URL
AIOWPSecurity_Utility::redirect_to_url($redirect_url);
} else {
//allow through
}
}