PHP code example of osw3 / php-url-manager

1. Go to this page and download the library: Download osw3/php-url-manager library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

osw3 / php-url-manager example snippets


use OSW3\UrlManager\Parser;

$parser = new Parser('https://www.site.com');
print_r( $parser->infos() );
print_r( $parser->fetch('authority') );

use OSW3\UrlManager\Components\Domain;

$domain = new Domain('https://www.site.com');
print_r( $domain->infos() );
print_r( $domain->get('subject') );