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
how can i add a chatbox to my site?I have two web solutions I downloaded from the internet. Jobs Portal, Classified and a forum script. Each of the scripts has its own signup and log in module. How can I make visitors register and login through one webpage without having to login in all th
How do I make sure an include file exists before loading the page?
where do i go to paste my google adsense code?
How to expire cookies when user pressed a button in webpage? I want have a link in my website then delete cookies.
