Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/crwlrsoft/url
Swiss Army knife for urls.
https://github.com/crwlrsoft/url
composer-package hacktoberfest idn parseurl php psr-7 punycode uri uri-parser url url-parser url-parsing urls
Last synced: 18 days ago
JSON representation
Swiss Army knife for urls.
- Host: GitHub
- URL: https://github.com/crwlrsoft/url
- Owner: crwlrsoft
- License: mit
- Created: 2018-04-15T14:57:21.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-01-31T16:23:38.000Z (11 months ago)
- Last Synced: 2024-07-21T08:26:27.900Z (5 months ago)
- Topics: composer-package, hacktoberfest, idn, parseurl, php, psr-7, punycode, uri, uri-parser, url, url-parser, url-parsing, urls
- Language: PHP
- Homepage: https://www.crwlr.software/packages/url
- Size: 546 KB
- Stars: 102
- Watchers: 2
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- project-awesome - crwlrsoft/url - Swiss Army knife for urls. (PHP)
README
# A Swiss Army knife for URLs
This package is for you when PHP's parse_url() is not enough.
__Key Features:__
* __Parse a URL__ and access or modify all its __components__ separately.
* Resolve any __relative reference__ you may find in an HTML document __to an
absolute URL__, based on the document's URL.
* Get not only the full __host__ of a URL, but also the __registrable domain__,
the __domain suffix__ and the __subdomain__ parts of the host separately
(Thanks to the [Mozilla Public Suffix List](https://publicsuffix.org/)).
* An advanced API to access and manipulate the __URL query__ component.
* __Compare URLs__ or components of URLs (e.g. checking if different URLs
point to the same host or domain)
* Thanks to [symfony/polyfill-intl-idn](https://github.com/symfony/polyfill-intl-idn)
it's also no problem to parse __internationalized domain names (IDN)__.
* Includes an adapter class which implements the
[PSR-7 UriInterface](https://github.com/php-fig/http-message/blob/master/src/UriInterface.php).## Documentation
You can find the documentation at [crwlr.software](https://www.crwlr.software/packages/url/getting-started).## Contributing
If you consider contributing something to this package, read the [contribution guide (CONTRIBUTING.md)](CONTRIBUTING.md).