I want to extract just the first three octets (the network basically) from an IP address with PHP.
I have an IP address (i.e. 126.96.36.199)
and I want to extract just the: 1.2.3 part
It could be 1, 2 or 3 numbers per octet (since it's an IP address):
could be: I want:
192.168.0.1 --> 192.168.0
10.1.102.3 --> 10.1.102