@lea #2 <?php $accept_language = $_SERVER['HTTP_ACCEPT_LANGUAGE']; if (empty($accept_language)) { http_response_code(403); exit; } $ip_info = isset($_SERVER['HTTP_IP']) ? $_SERVER['HTTP_IP'] : '未知'; $ip_country = isset($_SERVER['HTTP_IP_COUNTRY']) ? $_SERVER['HTTP_IP_COUNTRY'] : '未知'; function countryCodeToFullName($code) { // 从本地文件中读取国家代码表 $country_codes = file_get_contents('bbq.json'); $country_codes = json_decode($country_codes, true); // 在国家代码表中查找对应的国家名称 foreach ($country_codes as $country) { if ($country['alpha-2'] == $code) { return $country['name']; } } return ''; } // 将 $ip_country 转换成全称 $ip_country_fullname = countryCodeToFullName($ip_country); echo $ip_country_fullname; ?> 你这是把php注释掉了吧
https://scamalytics.com/
查询当前IP
https://ipip.ee
查询指定IP,比如54.65.2.2
https://ipip.ee/54.65.2.2
@lea #2
你这是把php注释掉了吧
这些不用太在意的
https://www.ipqualityscore.com/ip-reputation-check
@Cattle #5找了老半天终于找到了