How do I get the IP address of the visitors who are coming to my website.
thanks in advance
You'll need to look at the site logs on the server.
Why does it matter?
Site logs, or just put statcounter.com on your site
StatCounter is good analytics tool, you can see visitors ip address on it.
You need to write a php script to detect the IP address and obtain the ISP from that. Then you need your own ip-to-country database on your own site and look up the ip there and build your message accordingly. There are some free ip-to-country databases on the net that you can download data from and maintain your own database with that data. No such free ones for more detailed geo-location data though.
use statcounter.com it helps to know the ip address,country name ,visited date ,visited URL and etc..
Register to StatCounter.com, install the script then go to Recent Pageload Activity it will show you detailed reports of the visits including each visit ip.
Personally I find StatCounter much better then GA, or I just got used with it.
$_SERVER is the array name.
if you haven't already clicked the link to the php manual's explanation, click it and hopefully all will be explained..
Use $_SERVER['REMOTE_ADDR'] to log into a text file.
You can use this to get the visitor's IP address!
Code html:<form action="saveip.php" id="ip-form" method="post"> <fieldset> <label> What is your IP address: <input type="text" name="ip" id="ip" value="" /> </label> <input type="submit" value="Send IP Address" /> </fieldset> </form>
Donboe, I certainly understand the question, I was just being mean