How do I find a visitors IP address?
In order to do this, you can easily access the IP address through an environment variable.
The one that you want for the IP Address is called $REMOTE_ADDR, so you can access it like this:
<?php
$ip = $REMOTE_ADDR;
echo "Your IP address is $ip";
?>
More website PHP Questions
How do I perform a 301 redirect with PHP?How do I keep my site menu in one file?
How do I make sure an include file exists before loading the page?
How to find a domain name for an IP address?
How do I display todays date on my website?