How to learn the visitor's ip

How to learn the visitor's ip

How to learn, who visited your site from what IP addresses on it came? Or who is on it at present? This and other information can be obtained, having inserted the simplest scripts on the page of your Internet resource.

Instruction

1. You can learn who visited your website, having used the free counter of attendance: http://gostats.ru/ Study information provided there, insert the code of the counter on your website. You will find all information necessary for you on visitors of your resource in its reports. Similar characteristics also the http://iplogger.ru/ service has

2. There is a lot of similar resources in network, but they have one shortcoming – there is no confidence that the reference added on the website (as in a case with the last specified service) does not conduct on the sniffer stealing confidential information.

3. If you not too trust third-party services, you can organize accounting of the IP addresses of visitors directly on your website. To learn who visited him, it is necessary to insert on a page, after the closing tag / HTML, the code given below:

5. This code is written in the PHP language and gives information on run time for the website, the IP address of the visitor and the used browser. All information is written to the text file base.php. For its creation just open the empty text file (in "Notepad") and save it as base.txt, then rename expansion for php and lay out the file in a root directory. To look who visited your website, is enough to gather in the browser: _http://adres_vashego_sayta/base.php

6. That nobody else could not read the file with reports, enter in it a line: But in this case you will be able to browse the log only via the control panel of the website.

Author: «MirrorInfo» Dream Team


Print