Problem in finding ISP host name

Asked By 40 points N/A Posted on -
qa-featured

How do I find a person's ISP watching a PHP page ?Is it possible to use to keep track or reveal in PHP ?

If something like the following : gethostbyaddr ($ _SERVER [' REMOTE_ADDR ']) ;

It gives my IP address , hostname or not my ISP. Why is it so ?

SHARE
Answered By 562965 points N/A #187640

Problem in finding ISP host name

qa-featured

If you want to get or retrieve the Internet Service Provider’s name of a user in PHP, you can use the function “geoip_isp_by_name”. This function returns the name of the ISP where an IP or IP address is assigned to. Unfortunately this function is only available currently to users who purchased a commercial GeoIP ISP Edition. A warning is thrown if it cannot locate the proper database.

If you have the commercial edition of GeoIP ISP, you will have the appropriate database for all the ISPs around the world and the warning will not be issued when you use the function. The image below shows the description how to declare the function.

“hostname” refers to the hostname or the IP address. On success, it returns the ISP name, otherwise it will return FALSE if it can’t find the address in the database.

The image above is an example how you use the “geoip_isp_by_name” function. The example will print the ISP name of the host “example.com” which is then described in the image below.

Login/Register to Answer

Related Questions