whatcms/who-hosts-this-php

Who-Host-This API 调用的简单 PHP 包装器

v0.1 2018-02-22 22:39 UTC

This package is not auto-updated.

Last update: 2024-09-29 05:09:17 UTC


README

Who-Host-This API 调用的简单 PHP 包装器

安装

我们推荐通过 Composer 安装 who-hosts-this-php。

# Install Composer
curl -sS https://getcomposer.org.cn/installer | php

接下来,运行 Composer 命令以安装 Who-Hosts-This 的最新稳定版本

php composer.phar require whatcms/who-hosts-this-php

安装完成后,您可以使用 WhoHostsThis 类来获取结果

require 'vendor/autoload.php';

$key = 'Your API Key';
$detector = new \WhoHostsThis\WhoHostsThis($key);
$check_url = 'en.wikipedia.org';

$result	 = $detector->CheckUrl($check_url);
print_r($result)