How do I retrieve the visitor's ISP through PHP?

后端 未结 15 1452
暖寄归人
暖寄归人 2020-12-01 11:17

How do I find out the ISP provider of a person viewing a PHP page?

Is it possible to use PHP to track or reveal it?

If I use something like the following:

15条回答
  •  失恋的感觉
    2020-12-01 11:53

    A quick alternative. (This website allows up to 50 calls per minute.)

    $json=file_get_contents("https://extreme-ip-lookup.com/json/$ip");
    extract(json_decode($json,true));
    echo "ISP: $isp ($city, $region, $country)
    ";

    API details at the bottom of the page.

提交回复
热议问题