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 access information sent through POST on a form?Explain why the meaning people have of health may contrast with the meanings other people may hold.
Help : how to automatically upload files every 5 minutes ? Hi , Can anybody help me with this php code : I want to read the file names from a folder ( word document files or media files with extentions) and enter the url of the files in mysql d
How to expire cookies when user pressed a button in webpage? I want have a link in my website then delete cookies.
how to get gmail inboxmessages in php using username and password
