PHP code example of midnite81 / urlparser

1. Go to this page and download the library: Download midnite81/urlparser 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/ */

    

midnite81 / urlparser example snippets


 

 new Midnite81\UrlParser\Url('http://example.com/gallery/houses?hiRes=1#forSale');

echo $url->path(); // returns '/gallery/houses'
echo $url->fileName() // returns 'houses'