dev-master
9999999-dev https://github.com/Whoisdoma/DomainParser/A domain name parser to parse and to validate a domain name.
MIT
domain php domainparser
Wallogit.com
2017 © Pedro Peláez
A domain name parser to parse and to validate a domain name.
A domain name parser to parse and to validate a domain name., (*1)
At first it will parse a given string to split it by the hostname and top-level domain name. This will be done with a list from Mozilla and we also added some missing second-level domain names. Afterwards we will convert the domain name to it punycode and unicode notation. If an error occures by doing so, e.g. characters that are not allowed. It will kill these characters and set a flag to false. This flag is used for the validation., (*2)
Copyright (c) 2016 XAOS Interactive (http://xaosia.com) | Whoisdoma (http://whoisdoma.com), (*3)
Licensed under the MIT License (the "License")., (*4)
Installing using composer: composer require whoisdoma/domainparser, (*5)
Installing from source: git clone git://github.com/Whoisdoma/DomainParser.git or download the latest release, (*6)
Move the source code to your preferred project folder., (*7)
require_once 'DomainParser/Parser.php';
use Whoisdoma\DomainParser\Parser;
$Parser = new Whoisdoma\DomainParser\Parser();
$result = $Parser->parse($string);
$result = $Parser->parse($string, $yourPreferredDefaultTld);
$Parser->setFormat('json');
$Parser = new Whoisdoma\DomainParser\Parser('json');
Thanks to developers of following used libraries: * phlyLabs: http://phlylabs.de * mozilla: http://www.mozilla.org, (*8)
See ChangeLog at https://github.com/Whoisdoma/DomainParser/blob/master/CHANGELOG.md, (*9)
Please report any issues via https://github.com/Whoisdoma/DomainParser/issues, (*10)
Copyright (c) 2016 XAOS Interactive (http://xaosia.com) | Whoisdoma (http://whoisdoma.com), (*11)
License: https://github.com/Whoisdoma/DomainParser/blob/master/LICENSE, (*12)
A domain name parser to parse and to validate a domain name.
MIT
domain php domainparser