100"; // Get malicious ip$bad_ip_rs = mysql_query($bad_ip"/> 100"; // Get malicious ip$bad_ip_rs = mysql_query($bad_ip">

Home  >  Article  >  Backend Development  >  What does it mean when an IP address conflicts with other systems on the network? Filter malicious IPs

What does it mean when an IP address conflicts with other systems on the network? Filter malicious IPs

WBOY
WBOYOriginal
2016-07-28 08:30:211359browse
// 过滤恶意IP
function deny_bad_ip($kmLoginIP){
	$bad_ip_arr = array();
	$bad_ip_sql = "select ip,count(ip) num from anlene_join_user group by ip having num>100"; // 获取恶意ip
	$bad_ip_rs = mysql_query($bad_ip_sql);
	while($bad_ip_row = mysql_fetch_assoc($bad_ip_rs)){
		$bad_ip_arr[] = $bad_ip_row['ip'];
	}
	if(in_array($kmLoginIP, $bad_ip_arr)){
		return true;
	}else{
		return false;
	}
}

The above introduces what does it mean when an IP address conflicts with other systems on the network, and how to filter malicious IPs, including what does it mean when an IP address conflicts with other systems on the network. I hope friends who are interested in PHP tutorials can learn from it. help.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn