/ Published in: PHP

A simple method of validating an IP address using PHP and regular expressions
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
$string = "255.255.255.255"; '/^(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:[.](?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}$/', $string)) { echo "IP address is good."; }
URL: http://www.thejwalker.com
Comments
