Joshua F Posted June 21, 2010 Share Posted June 21, 2010 I would like to know how to make my website show the viewers IP to them, this will just make it so they know there IP is being logged. Any ideas? Link to comment https://forums.phpfreaks.com/topic/205481-viewers-ip/ Share on other sites More sharing options...
gizmola Posted June 21, 2010 Share Posted June 21, 2010 $_SERVER['REMOTE_ADDR'] works in most cases. Link to comment https://forums.phpfreaks.com/topic/205481-viewers-ip/#findComment-1075294 Share on other sites More sharing options...
Joshua F Posted June 21, 2010 Author Share Posted June 21, 2010 So would it look like this..? <?php echo ' $_SERVER['REMOTE_ADDR'] '?> Edit: Got it to work, the code is the following. <?php echo ($_SERVER['REMOTE_ADDR'])?> Link to comment https://forums.phpfreaks.com/topic/205481-viewers-ip/#findComment-1075295 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.