
Moore - 2011-06-23 02:50:17
Hi Alexey, thanks for the great class.
Just one question about checking the octets of the IP addresses.
When testing for the 192.168 and 169.254 ranges, I noticed that it only checks the 1st octet ($octets[0]) for both the first and second octet of the IP address.
if($octets[0] == '192' && $octets[0] == '168') return false;
if($octets[0] == '169' && $octets[0] == '254') return false;
Should it be checking for the second octet ($octets[1]) like this instead ?
if($octets[0] == '192' && $octets[1] == '168') return false;
if($octets[0] == '169' && $octets[1] == '254') return false;