Home> php教程> php手册> body text

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

WBOY
Release: 2016-05-25 16:41:01
Original
1680 people have browsed it

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

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


本文地址:

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

source:php.cn
Statement of this Website
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
Popular Recommendations
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!