차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판이전 판
다음 판
이전 판
tech:what_is_my_ip [2014/09/20 15:18] V_Ltech:what_is_my_ip [2016/07/12 00:56] (현재) – 바깥 편집 127.0.0.1
줄 1: 줄 1:
 +{{tag>ip주소 php}}
 ====== IP주소 알아내기.php  ====== ====== IP주소 알아내기.php  ======
  
줄 23: 줄 24:
 ?> ?>
 </file> </file>
 +
 +같은 것인데 더 짧게...
 +
 +<file php>
 +<?php
 +$domain=$_SERVER['REMOTE_ADDR'];
 +$domain1 = isset($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR'];
 +echo "Viewer Server's (Remote) IP Address: <strong>$domain</strong> - ";
 +echo "Viewer Real (Local-Machine) IP Address: <strong>$domain1</strong>";
 +?>
 +</file>
 +
 +
 +
  
  
-{{tag>ip주소 php}}