Is there an easy to check if an IP is in range or not? For example, say I have this IP range 1.2.3.4 to 6.7.255.9 inclusive. Ip like 5.255.255.255, 2.1.1.1, 12.6.255.255, 1.2.3.4, 1.6.2.5 are considered to be inside the range. I thought about split the ip with '.', Would doing something like
convert
1.2.3.4 => 001002003004
12.6.255.255 => 012006255255
convert the target ip (say 128.1.0.3) to 1280010003