string gethostbyaddr ( string $ip_address )
(PHP 4, PHP 5)

gethostbyname 함수는 호스트 이름으로 ip주소를 출력하지만 gethostbyaddr 는 반대로 ip주소로 호스트 이름을 출력합니다.

<?php
 if($host = gethostbyaddr ("69.147.125.xx")) {
   print($host); 
   // 출력: ir1.fp.vip.ac4.yahoo.com
 }
 ?>

0 댓글