91721/how-to-check-an-ip-address-is-within-a-range-of-two-ips-in-php
Hello @kartik,
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"; }
Hope it helps!!
Hello @kartik, If only using IPv4: use ip2long() to convert the ...READ MORE
Given this array: $inventory = array( ...READ MORE
Hello, Considering that you have $replaced = array('1' => ...READ MORE
Hello, Here is a code sample of a good ...READ MORE
Hey @kartik, First you have to go to ...READ MORE
Named route is used to give specific ...READ MORE
Hello, This is simple you just need to ...READ MORE
Hey @kartik, Named routing is another amazing feature of ...READ MORE
Hello, Try this without regular expressions: <?php ...READ MORE
Hello @kartik, You can use instanceof: if ($pdo instanceof PDO) ...READ MORE
OR
At least 1 upper-case and 1 lower-case letter
Minimum 8 characters and Maximum 50 characters
Already have an account? Sign in.