dev-master
9999999-dev https://github.com/louisheimel/DomainParser/A domain name parser to parse and to validate a domain name.
Apache-2.0
domain php domainparser
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) 2007 - 2013 Novutec Inc. (http://www.novutec.com) Licensed under the Apache License, Version 2.0 (the "License")., (*3)
Installing from source: git clone git://github.com/novutec/DomainParser.git
or download the latest release, (*4)
Move the source code to your preferred project folder., (*5)
require_once 'DomainParser/Parser.php';
$Parser = new Novutec\DomainParser\Parser();
$result = $Parser->parse($string);
$result = $Parser->parse($string, $yourPreferredDefaultTld);
$Parser->setFormat('json'); $Parser = new Novutec\DomainParser\Parser('json');
Thanks to developers of following used libraries: * phlyLabs: http://phlylabs.de * mozilla: http://www.mozilla.org, (*6)
See ChangeLog at https://github.com/novutec/DomainParser/blob/master/CHANGELOG.md, (*7)
Please report any issues via https://github.com/novutec/DomainParser/issues, (*8)
Copyright (c) 2007 - 2013 Novutec Inc. (http://www.novutec.com), (*9)
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, (*10)
http://www.apache.org/licenses/LICENSE-2.0, (*11)
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., (*12)
A domain name parser to parse and to validate a domain name.
Apache-2.0
domain php domainparser