Giter Club home page Giter Club logo

Comments (11)

jeremykendall avatar jeremykendall commented on June 7, 2024 1

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.

peter279k avatar peter279k commented on June 7, 2024

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.

jwage avatar jwage commented on June 7, 2024

Should we stop using that package? I don't think it is being maintained.

from purl.

peter279k avatar peter279k commented on June 7, 2024

@jwage , do you mean we stop using the php-domain-parser package?

from purl.

jwage avatar jwage commented on June 7, 2024

Yes, we would have to bring what it does in house. I'm not sure if it makes sense.

from purl.

peter279k avatar peter279k commented on June 7, 2024

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.

jwage avatar jwage commented on June 7, 2024

@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.

jeremykendall avatar jeremykendall commented on June 7, 2024

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.

peter279k avatar peter279k commented on June 7, 2024

@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.

jeremykendall avatar jeremykendall commented on June 7, 2024

@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.

jwage avatar jwage commented on June 7, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.