jeremykendall / php-domain-parser

Public Suffix List based domain parsing implemented in PHP
MIT License
1.16k stars 128 forks source link

Parsing URLs in version 6 and above? #326

Closed jmikerq closed 2 years ago

jmikerq commented 2 years ago

I came from the time of using php-domain-parser@v.3 and it was able to parse a URL. I am just wondering this is still supported in v.6?

I went through the source code and did some test, but looks like only 'domain' value is accepted. I tried to enter http://test.domain.com/testpath?query=testparam and it would throw exception for invalid value.

So I would like to confirm if this is the case? if so, what's the latest version that I can parse a URL input?

nyamsprod commented 2 years ago

Hi @jmikerq, since version 5 parsing URI feature has been removed from the package. The reason behind the removal is that the main feature of this package was domain name resolution and not URL resolution.

If you are looking for a URI/URL parser package a quick search on packagist.org should return modern packages that can perform a better job at parsing the full URL:

https://packagist.org/?query=parse%20URL .