| 198 |
{ |
{ |
| 199 |
$ip_str=gethostbyname($ip_str); |
$ip_str=gethostbyname($ip_str); |
| 200 |
|
|
| 201 |
if (!(ereg("^([0-9]{1,3}).([0-9]{1,3}).([0-9]{1,3}).([0-9]{1,3})$",$ip_str,$ips))) |
if (!(preg_match("/^([0-9]{1,3}).([0-9]{1,3}).([0-9]{1,3}).([0-9]{1,3})$/",$ip_str,$ips))) |
| 202 |
{ |
{ |
| 203 |
echo "<p>Invalid IP address!</p>"; |
echo "<p>Invalid IP address!</p>"; |
| 204 |
} |
} |
| 205 |
|
|
| 206 |
// if (ereg("^10.",$ip_str) || ereg("^192.168.",$ip_str)) |
// if (preg_match("/^10./",$ip_str) || preg_match("/^192.168./",$ip_str)) |
| 207 |
if (false) |
if (false) |
| 208 |
{ |
{ |
| 209 |
$xml_parser = xml_parser_create(); |
$xml_parser = xml_parser_create(); |