Comments (11)
PHP Domain Parser is under active maintenance. If you’re having issues with parsing please make sure the public suffix list cache is up to date. If that doesn’t solve the issue please open an issue against the parser so we can get it taken care of. Thanks!
from purl.
This issue is happened by this line and this is the php-domain-parser
package.
You should submit the issue for the php-domain-parser
.
After upgrade that package version to 3.0
version, this issue has been existed.
Here is my code I run:
<?php
require_once 'vendor/autoload.php';
$pslManager = new Pdp\PublicSuffixListManager();
$parser = new Pdp\Parser($pslManager->getList());
$host = 'http://anil.blogspot.co.uk';
$url = $parser->parseUrl($host);
var_dump($url);
from purl.
Should we stop using that package? I don't think it is being maintained.
from purl.
@jwage , do you mean we stop using the php-domain-parser
package?
from purl.
Yes, we would have to bring what it does in house. I'm not sure if it makes sense.
from purl.
We can use another parser package to replace the php-domain-parser
package.
How about refering this one?
What do you think?
Thanks.
from purl.
@peter279k That package is fully featured? I think we only use php-domain-parser for a very small piece of functionality so I don't think it makes sense to pull in a big library like that. What if we just pull the small bit of functionality we depend on php-domain-parser for back in to Purl?
from purl.
By parsing, the domain parser only helps identify component parts of a URL: sub domain, domain, and registrable domain. It is definitely not a full featured URL parser. It’s intended as a complement to purl.
from purl.
@jeremykendall, thank you for your reply.
I appreciate that explanation and I think the domain, and sub domain should be implemented by purl
.
How about opening another issue about this, @jwage ?
from purl.
@peter279k I highly recommend doing a bit of research about URL parsing before deciding to attempt to implement it yourself. Regex won't cut it. I'm not saying you shouldn't, and switching from php-domain-parser might be the best for the project, but it's a topic that's fairly complex and should be well considered before making a decision to reimplement the functionality.
from purl.
@jeremykendall Thanks for chiming in. @peter279k Lets open an issue on php-domain-parser and see if we can get it fixed there.
from purl.
Related Issues (20)
- Feature request: resolving urls HOT 1
- How to remove a part of the url ? HOT 1
- how to set IP address as host in a url ? HOT 1
- Using parse() inside loop eats up all memory HOT 4
- Incorrect handling of long generic domain extensions
- Consider adding PHPUnit to composer package list HOT 2
- Joining with a protocol-relative url HOT 3
- Php 7.2.2 Calling parse_str() without the result argument is deprecated HOT 1
- Incompatible with modern software HOT 4
- Require PHP 7.1
- Add phpstan and Doctrine coding standards
- Purl can fail to parse the fragment HOT 3
- PHP7.2 parse_str param 2 not null HOT 3
- Nz domains are not parsing correctly HOT 12
- Why does remove() return "void" HOT 2
- require old jeremykendall/php-domain-parser version HOT 4
- Request: new patch version
- subdomain and registerableDomain no longer work HOT 2
- PHP8: Compile Error Purl\AbstractPart::__set(): Return type must be void when declared
- Support PHP8 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from purl.