Integration of Domain Parser into Symfony
You need PHP >= 5.5.0 but the latest stable version of PHP/HHVM is recommended.
Via Composer
$ composer require egyg33k/domain-parser-bundle
// Add this line to your AppKernel.php new Egyg33k\DomainParserBundle\Egyg33kDomainParserBundle(),
// Then you can use it as following
$parser = $this->container->get('egyg33k.domainParser');
$host = 'http://user:pass@www.pref.okinawa.jp:8080/path/to/page.html?query=string#fragment';
$url = $parser->parseUrl($host);
var_dump($url);
Original docs https://github.com/jeremykendall/php-domain-parser
$ phpunit
If you discover any security related issues, please email me@amrsamy.com instead of using the issue tracker.
- Amr Samy me@amrsamy.com
The MIT License (MIT). Please see License File for more information.