PHP code example of savin / url
1. Go to this page and download the library: Download savin/url 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/ */
savin / url example snippets
$url = Url::parse('https://www.google.com/search?q=curent+time');
var_dump($url);
/*
array(7) {
["scheme"]=>
string(5) "https"
["host"]=>
string(14) "www.google.com"
["path"]=>
string(7) "/search"
["query"]=>
string(13) "q=curent+time"
["port"]=>
NULL
["user"]=>
NULL
["fragment"]=>
NULL
}
*/