Source Code:
(back to article)
<?php $ip = "129.0.0.1"; if (!filter_var($ip, FILTER_VALIDATE_IP) === false) { echo "$ip is a valid IP address"; } else { echo "$ip is not a valid IP address"; } ?>
Result:
Report an issue