View Full Version : Showing Server IP address
11-23-2003, 04:51 AM
I am working on a new hobby site, and I would like to have it show (at the top) (persons_username)@(server_ip_address). Where the respective blanks are filled in with the respective entries based on the person who is at the site and the current IP of the server. Is there any way that I could have PHP display the server's IP address? Thanks in advance for anyone who reads this.
11-23-2003, 04:57 AM
11-23-2003, 07:35 AM
<?php echo $_SERVER['REMOTE_ADDR'];?>
11-23-2003, 03:19 PM
are you wanting the IP of the visitor or, as you said, the server?
for the server you can use $_SERVER['SERVER_ADDR'] or firepage's code form above for the visitor's IP
11-23-2003, 06:24 PM
doh sorry , I just assumed Visitor IP , I must be getting old :(
11-23-2003, 09:25 PM
thanks everybody! this is my favorite forum!
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.