{"id":13792981,"url":"https://github.com/Whoisdoma/DomainParser","last_synced_at":"2025-05-12T17:31:35.166Z","repository":{"id":55423948,"uuid":"60471244","full_name":"Whoisdoma/DomainParser","owner":"Whoisdoma","description":null,"archived":false,"fork":false,"pushed_at":"2020-12-31T13:02:06.000Z","size":31,"stargazers_count":4,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-06T16:19:32.732Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Whoisdoma.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-06-05T17:06:29.000Z","updated_at":"2023-01-25T14:57:26.000Z","dependencies_parsed_at":"2022-08-15T00:00:52.951Z","dependency_job_id":null,"html_url":"https://github.com/Whoisdoma/DomainParser","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Whoisdoma%2FDomainParser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Whoisdoma%2FDomainParser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Whoisdoma%2FDomainParser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Whoisdoma%2FDomainParser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Whoisdoma","download_url":"https://codeload.github.com/Whoisdoma/DomainParser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225144934,"owners_count":17427894,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T22:01:19.439Z","updated_at":"2024-11-18T07:30:16.311Z","avatar_url":"https://github.com/Whoisdoma.png","language":"PHP","funding_links":[],"categories":["类库"],"sub_categories":["URL/Domain"],"readme":"Whoisdoma Domain Parser\n=====================\n\nA domain name parser to parse and to validate a domain name.\n\nAt first it will parse a given string to split it by the hostname and top-level domain name.\nThis will be done with a list from Mozilla and we also added some missing second-level domain\nnames. Afterwards we will convert the domain name to it punycode and unicode notation. If an\nerror occures by doing so, e.g. characters that are not allowed. It will kill these characters\nand set a flag to false. This flag is used for the validation.\n\nCopyright (c) 2016 XAOS Interactive (http://xaosia.com) | Whoisdoma (http://whoisdoma.com)\n\nLicensed under the MIT License (the \"License\").\n\nInstallation\n------------\nInstalling using composer: `composer require whoisdoma/domainparser`\n\nInstalling from source: `git clone git://github.com/Whoisdoma/DomainParser.git` or [download the latest release](https://github.com/Whoisdoma/DomainParser/zipball/master)\n\nMove the source code to your preferred project folder.\n\nUsage\n-----\n* Include Parser.php\n```\nrequire_once 'DomainParser/Parser.php';\n```\n\n* or if using composer:\n```\nuse Whoisdoma\\DomainParser\\Parser;\n```\n\n* Create Parser() object\n```\n$Parser = new Whoisdoma\\DomainParser\\Parser();\n```\n\n* Call parse() method\n```\n$result = $Parser-\u003eparse($string);\n```\n\n* Please note, if the given string doesn't contain a domain name the default tld\n.com will be added to the query. You may change this by adding a tld to the parse\nmethod call.\n```\n$result = $Parser-\u003eparse($string, $yourPreferredDefaultTld);\n```\n\n* You may choose 5 different return types. the types are array, object, json, serialize and\nxml. By default it is object. If you want to change that call the format method before calling\nthe parse method or provide to the constructer. If you are not using object and an\nerror occurs, then exceptions will not be trapped within the response and thrown directy.\n```\n$Parser-\u003esetFormat('json');\n$Parser = new Whoisdoma\\DomainParser\\Parser('json');\n```\n\n3rd Party Libraries\n-------------------\nThanks to developers of following used libraries:\n* phlyLabs: http://phlylabs.de\n* mozilla: http://www.mozilla.org \n\nChangeLog\n---------\nSee ChangeLog at https://github.com/Whoisdoma/DomainParser/blob/master/CHANGELOG.md\n\nIssues\n------\nPlease report any issues via https://github.com/Whoisdoma/DomainParser/issues\n\nLICENSE and COPYRIGHT\n---------------------\nCopyright (c) 2016 XAOS Interactive (http://xaosia.com) | Whoisdoma (http://whoisdoma.com)\n\nLicense: https://github.com/Whoisdoma/DomainParser/blob/master/LICENSE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FWhoisdoma%2FDomainParser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FWhoisdoma%2FDomainParser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FWhoisdoma%2FDomainParser/lists"}