Tech Tips
How to display a visitor's IP address
Time: February 04 01:51pm
Using PHP
To display a visitor's IP address (to them) using PHP,
just add this line of code where you'd like the IP address to be displayed on your page:
<p>Your IP Address: <?echo $REMOTE_ADDR ?></p> Make sure you escape the PHP script before adding that line of code. It will show as this:
Your IP Address: 38.107.179.234
PLEASE NOTE - Your IP address will only show to you. Other visitors will see THEIR IP address.
Using JavaScript
To display a visitor's IP address using JavaScript (most likely your choice for
Network54 forums), just go to THIS WEB SITE and follow the directions there
You will get code to show the following:
PLEASE NOTE - Your IP address will only show to you. Other visitors will see THEIR IP address.