finpaytech/iphub

使用 IPHub API 的 VPN/Proxy/服务器检测器

1.0.2 2018-03-04 14:47 UTC

This package is not auto-updated.

Last update: 2024-09-29 04:03:31 UTC


README

使用 IPHub API 的 VPN/Proxy/服务器检测器

安装

composer require finpaytech/iphub

要求

PHP 5.5+ 且已启用 cURL 扩展

使用示例

$ip = $_SERVER['REMOTE_ADDR'];
try {
	$block = IPHub::isBadIP( $ip, "IP HUB API Key" );
	if($block == 1){
		die("Request blocked as you appear to be browsing from a VPN/Proxy/Server. Please contact support if you believe this is a mistake.");		
	}
} catch (\Exception $e) {
	$block = false;
}

API 文档

API 文档可在此处找到: https://docs.iphub.info/documentation/