
25.12.2007, 21:04
|
|
Познающий
Регистрация: 27.08.2007
Сообщений: 48
С нами:
9845611
Репутация:
17
|
|
<?php print" <form action='' method='POST'> <input type=text name='ip' value= ''size='' maxlen='12'> <input type=submit value=Ok> </form>"; $ip=($_POST['ip']); if(! preg_match ( '/^([\d]{1 ,3 }\.[\d]{1 ,3 }\.[\d] {1 ,3 }\. [\d]{1 ,3})$/', $ip )){die( 'Удачной дороги нафиг!' );} $hostname=gethostbyadd r("$ip");echo"имя $ip: $hostname";?>
|
|
|