최근 포토로그


이전페이지(클라이언트)의 ip주소를 알아내고 싶을때. PHP

<?php
$ip 
gethostbyname('www.example.com'
);

echo 
$ip
;
?>



참고
  • gethostbyaddr() - Get the Internet host name corresponding to a given IP address
  • gethostbynamel() - Get a list of IPv4 addresses corresponding to a given Internet host name
  • inet_pton() - Converts a human readable IP address to its packed in_addr representation
  • inet_ntop() - Converts a packed internet address to a human readable representation



  • 덧글

    댓글 입력 영역