Skip to content
/ whois Public

PHP-Whois是一个非常轻量级的域名whois信息查询类,具有部署简单和方便扩展的特点

Notifications You must be signed in to change notification settings

wenpeng/whois

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

PHP-Whois

PHP-Whois是一个非常轻量级的域名whois信息查询类,具有部署简单和方便扩展的特点

需求

建议使用 PHP 5.3 +

用法

$whois = new Whois;

$query = $whois->query(域名主体, 重试次数); 

// 成功
array(
    'error' => 0,
    'data' => array(
        'domain' => 域名主体,
        'registration' => 注册状态,
        // 以下只在已注册时有效
        'registrar' => 域名服务商,
        'creation' => 注册时间,
        'expiration' => 过期时间,
        'status' => 域名状态,
    )
);

// 失败
array(
    'error' => 1,
    'message' => 失败原因
);

#示例

$whois = new Whois;

$query = $whois->query('v2ex.com', 3); 

var_dump($query);

array(
    'error' => 0,
    'data' => array(
        'domain' => 'v2ex.com',
        'registration' => 'registered',
        'registrar' => 'TUCOWS DOMAINS INC.',
        'creation' => '1119542400',
        'expiration' => '1466697600',
        'status' => 'clientTransferProhibited',
    )
);

About

PHP-Whois是一个非常轻量级的域名whois信息查询类,具有部署简单和方便扩展的特点

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages