3dhomejoe Posted February 29, 2008 Share Posted February 29, 2008 Here is my script, i want it to show the servers ip, the clients ip works <?php$ip1 = $_SERVER['SERVER_ADDR'];$ip2 = $_SERVER['REMOTE_ADDR'];Echo "Server IP is".$ip1;Echo "Your IP is" .$ip2;?> Link to comment Share on other sites More sharing options...
Synook Posted February 29, 2008 Share Posted February 29, 2008 Does it show the "client's" IP twice, or just show nothing for the server? Link to comment Share on other sites More sharing options...
jlhaslip Posted March 2, 2008 Share Posted March 2, 2008 run this on your Server to see a list of the $_SERVER array item your server supports. <?php$ip1 = $_SERVER['SERVER_ADDR'];$ip2 = $_SERVER['REMOTE_ADDR'];echo 'Server IP is ' . $ip1 . '<br />';echo 'Your IP is' . $ip2;echo '<pre><br />';print_r($_SERVER);echo '</pre><br />';?> Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.