With ip2long()
it’s easy to convert your addresses to numbers. After this, you just have to check if the number is in range:
if ($ip <= $high_ip && $low_ip <= $ip) {
echo "in range";
}
More Related Contents:
- How to log IP address in text file
- IP addresses in PHP
- Getting the location from an IP address [closed]
- Getting visitors country from their IP
- How to get Real IP from Visitor? [duplicate]
- How to handle IPv6 Addresses in PHP?
- How to get MAC address of client using PHP?
- How to check if an integer is within a range?
- select outgoing ip for curl request
- IP address storing in MySQL database using PHP [duplicate]
- How to get Time Zone through IP Address in PHP [duplicate]
- Getting list IPs from CIDR notation in PHP
- Get user’s current location
- PHP: Create an array for a range
- How to use HTTP_X_FORWARDED_FOR properly?
- How to check if an integer is within a range of numbers in PHP?
- How to identify server IP address in PHP
- Get a user’s current location
- PHP range() from A to ZZ?
- php switch case statement to handle ranges
- How do I get the external IP of my server using PHP?
- Function To Create Regex Matching a Number Range
- Parsing HTTP_RANGE header in PHP
- Regex to match an IP address [closed]
- How to get CPU usage and RAM usage without exec?
- Comment associative array in PHP Documentor
- unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING error [duplicate]
- Laravel pluck fields from relations
- Can anyone give me an example for PHP’s CURLFile class?
- How to clear php’s gettext cache without restart Apache nor change domain?