How to disable access to an ip or ip address range by php
This article is about how php forbids access to an ip or ip address range. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
The specific analysis is as follows:
Because I haven't studied Apache and nginx in depth, I wrote a Mini Program with PHP that can disable the address.
When using it, just:
Can
Disable a single ip as follows: