jeremykendall / php-domain-parser

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

How to use? #351

Closed cvladan closed 1 year ago

cvladan commented 1 year ago

First and foremost, I express gratitude to the author for the time and effort he dedicated to developing this library.

I wish to point out that this library addresses a problem I rarely face, yet I am eager to resolve it swiftly. However, the provided instructions are remarkably unclear.

  1. Nowhere, I emphasize, nowhere does it state that one must download a DAT list of domains. Surely, it would not be overly burdensome to pen such a directive and indicate the appropriate address from which to download the DAT file? I guess it is https://publicsuffix.org/list/public_suffix_list.dat. Or not?

  2. Additionally, I presume I am also responsible for updating that DAT file, am I not?

This info has regrettably cost me a good 30 minutes of comprehension. ... I'm puzzled. What is proper way. And why those files are not updated with library?

Nonetheless, I sincerely thank the author for his effort.

nyamsprod commented 1 year ago

@cvladan thanks for using the library. In the documentation it is stated:

If you must use this library for any of the above purposes, please consider integrating an updating mechanism into your software.

For more information go to the Managing external data source section

Downloading and storing have been resolve in PHP community by more robust and battle tested architectures and packages so this package leverage on that knowledge to focus on what it does best domain name resolution. That being said, you can always submit some documentation improvements via a PR and I will be happy to review and integrate them to the current documentation.

nyamsprod commented 1 year ago

The documentation has been updated to highlight the need for a copy of the externals resources for the package to work as intended