Net_CheckIP::check_ip() -- Validation of IPv4 addresses
Description
This function can validate if a given string has a valid IPv4 syntax.
Return value
boolean - TRUE, if syntax is valid
Note
This function can be called
statically.
Example
Example 54-1. Using check_ip()
<?php
require_once "Net_CheckIP/CheckIP.php";
if (Net_CheckIP::check_ip("your_ip_goes_here")) {
// Syntax of the IP is ok
}
?>
|
|