2012-10-24 40 views

回答

0

試試這個:

<?php 
$domain=$_SERVER['REMOTE_ADDR']; 
$domain1 = isset($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; 
echo "Viewer's Server's IP Address: <strong>$domain</strong> - "; 
echo "Viewer's PC IP Address: <strong>$domain1</strong>"; 
?> 
相關問題