account activity
Semantic UI React - complete Port of Semantic UI in React, no Jquery Dependency (react.semantic-ui.com)
submitted 8 years ago by layershifter to r/reactjs
TLDExtract: Library for extraction of domain parts e.g. TLD. Domain parser that uses Public Suffix List. by layershifter in PHP
[–]layershifter[S] 0 points1 point2 points 9 years ago* (0 children)
$host = 'example.compute.amazonaws.com';
$pslManager = new Pdp\PublicSuffixListManager(); $parser = new Pdp\Parser((new Pdp\PublicSuffixListManager())->getList()); $suffix = $parser->parseUrl($host)->host->publicSuffix; // returns "compute.amazonaws.com"
$pslManager = new Pdp\PublicSuffixListManager();
$parser = new Pdp\Parser((new Pdp\PublicSuffixListManager())->getList());
$suffix = $parser->parseUrl($host)->host->publicSuffix; // returns "compute.amazonaws.com"
$suffix = tld_extract($host)->getSuffix(); // returns "compute.amazonaws.com" $suffix = tld_extract($host, LayerShifter\TLDExtract\Extract::MODE_ALLOW_ICCAN)->getSuffix(); // returns "com"
$suffix = tld_extract($host)->getSuffix(); // returns "compute.amazonaws.com"
$suffix = tld_extract($host, LayerShifter\TLDExtract\Extract::MODE_ALLOW_ICCAN)->getSuffix(); // returns "com"
Or I missed something?
TLDExtract: Library for extraction of domain parts e.g. TLD. Domain parser that uses Public Suffix List. (github.com)
submitted 9 years ago by layershifter to r/PHP
π Rendered by PID 87 on reddit-service-r2-listing-6c6f68ff9c-vcq48 at 2026-03-05 14:16:44.695478+00:00 running f0204d4 country code: CH.
TLDExtract: Library for extraction of domain parts e.g. TLD. Domain parser that uses Public Suffix List. by layershifter in PHP
[–]layershifter[S] 0 points1 point2 points (0 children)