Download the PHP package xandco/whoisparser without Composer
On this page you can find all versions of the php package xandco/whoisparser. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download xandco/whoisparser
More information about xandco/whoisparser
Files in xandco/whoisparser
Package whoisparser
Short Description Whois Parser, parses and formats raw whois query data.
License MIT
Homepage https://github.com/xandco/whoisparser
Informations about the package whoisparser
Whois Parser
Whois Parser simply parses raw root or whois data that you supply.
During the parsing process, the package will do a few checks via regular expressions, to determine that the input data is workable as well as determine if the input contains errors or if you've been rate limited. Then the package will clean the input data and format each line into key value pairs. Once that has been completed it will start to iterate through and parse the data into a more readable form and into a reliable output based on your output format preference.
Installation
Install this package via composer:
This service provider must be installed (if using anything below Laravel 5.5)
Publish and customize configuration file with:
Usage
Create new WhoisParser
object:
You will need to get the whois data for whatever domain you'd like with an external method, WhoisParser just parses said data. Once you have your raw whois data you can call the parse()
method to parse the data:
Based on whether you provide root data or whois data, the package will return differently structured objects. You will be able to check the type of object returned based on the type
key containing either the value root
or whois
.
Here is an example of both outputs:
Options
When creating the WhoisParser
object, there is only one array
parameter that can be passed, which is optional.
Options array parameters:
Option | Notes | Type | Default |
---|---|---|---|
output_format |
options (object , array , json , serialize ) |
string |
object |
get_nserver_ip |
try getting nameserver ips (using gethostbyname() ) |
bool |
false |
parse_billing |
try parsing billing contact (not always available) | bool |
false |
return_raw_data |
debug option, return raw input | bool |
false |
Instead of setting these options when creating the object, you can alternatively set these globally in the configuration file, as well as modify the regex patterns used to determine things like: invalid, rate limited whois responses and reserved, taken, available domains. You can publish the configuration and customize it as shown in the Installation section.
Changelog
Please see the changelog for more information on what has changed recently.
Testing
Contributing
Please see contributing.md for details and a todolist.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- X&Co
- Miguel Batres
- All Contributors
License
MIT - Please see the license file for more information.