PHP code example of zobzn / zbz-uri
1. Go to this page and download the library: Download zobzn/zbz-uri 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/ */
zobzn / zbz-uri example snippets
php
$uri = Zbz\Uri::get('http://examplex.org/index.php?key1=val1#title')
->withScheme('https')
->withAuthority('example.com')
->withPath('/index.htm')
->withQuery('key2=val2')
->withFragment('content');
var_export(array(
(string) $uri,
$uri->getScheme(),
$uri->getAuthority(),
$uri->getPath(),
$uri->getQuery(),
$uri->getFragment(),
));