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";
?>
Comment on this Question and Answer >>>
ASK A QUESTION
More website PHP Questions
What is this form of code for a website? http://www.virginamerica.com/va/home.do the drop down menu's. whats the name for that. im trying to incorporate it into my design, but dont no the name for it.I have uploaded a vbforum which is al coded in php. and i also have a php.ini file. i turned the display_errors off. so now whern i try to go to the site i see a blank page. And everything is correctly coded because i didn't change anything. But it works
my web site www.innovativephp.com is not configured properly to dns how can i do that?
How to find a domain name for an IP address?
How can I access information sent through POST on a form?
