IP checking false positives and no ipv6 check

The currently implemented method marks all IPs between 0.0.0.0 - 999.999.999.999 as valid IP Address. Which generates false positives as any IP after 255.255.255.255 is not a valid IP address.

Also, there is no check for IPv6 IP addresses.

filter_var() solves both the issues.
1 file changed