klkvsk/whoeasy 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

klkvsk/whoeasy

最新稳定版本:0.1.0

Composer 安装命令:

composer require klkvsk/whoeasy

包简介

Easily lookup domain names, IP addresses and AS numbers by WHOIS.

README 文档

README

Lookup domain names, IP addresses and AS numbers by WHOIS. Parse answers into structured data. Use proxies to counter rate limits.

Installation

Install from composer (until 1.0 prefer dev-master over releases, it's buggy anyway):

composer install klkvsk/whoeasy=dev-master

Usage

The main Whois class is a factory, and provides shorthand methods.

// get raw text answer
$rawText = \Klkvsk\Whoeasy\Whois::getRaw("example.com");

// or with parsing
$answer = \Klkvsk\Whoeasy\Whois::getParsed("example.com");
echo $answer->result->registrar->name;

You can customize the factory by extending Whois or you can utilize WhoisClient and WhoisParser directly.

Whoeasy is easily extensible. You can add your own client adapters, parsers, server configs, proxy providers, etc.

Built in client adapters are:

  • CurlTelnet - default if ext-curl is installed. Supports any proxies curl does.
  • Socket - fallback, uses stream_socket_client. Supports only HTTP(s)-tunnel proxies.

Whois-servers registry

By default, the client will select an appropriate server for your query. The list of servers is automatically generated from https://github.com/rfc1036/whois - a default whois tool in most Linux distributions. This is the most up-to-date source of correct whois servers per tld.

See generated registry for compiled list. See generator for source lists and build script.

CLI tool

Whoeasy can be used as command line tool:

$ vendor/bin/whoeasy -h

Usage:
  whoeasy [options] <domain>

Options:
  -s, --server <server>    use specified whois server
  -f, --format <format>    output format
  -v, --verbose            show debug output and traces
  -h, --help               show this message

Formats:
  w, raw      raw response
  t, text     clean text response (comments removed)
  r, result   structured result object [default]
  f, fields   parsed key-value pairs
  g, groups   key-value pairs split in blocks

ToDos

  • Using RDAP as an alternative adapter
  • Replace Novutec parsing templates with own

3rd Party Libraries

Parsing to a single format structure is based on Novutec WhoisParser

Issues

Please report any issues via https://github.com/klkvsk/whoeasy/issues

LICENSE and COPYRIGHT

Copyright (c) 2023 Misha Kulakovsky (https://github.com/klkvsk)

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

统计信息

  • 总下载量: 186
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2023-10-30