Home  >  Article  >  php教程  >  php实现禁止IP段访问网站的代码

php实现禁止IP段访问网站的代码

WBOY
WBOYOriginal
2016-05-25 16:41:011610browse

有个前提条件是我们的页面必须是php类型的页面,如果你生成了html静态页面这种方法就不可行了,下面我们来看看php实现禁止IP段访问网站的代码,代码如下:

 $ban_range_low && $ip < $ban_range_up) {
    print "Banned";
    exit();
}


本文地址:

转载随意,但请附上文章地址:-)

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