PHP code example of ngophuongtuan / url_helper
1. Go to this page and download the library: Download ngophuongtuan/url_helper 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/ */
ngophuongtuan / url_helper example snippets
$ composer
use Acme\urlHelper;
$url= new urlHelper();
$url->check($url); //return true if the $url is valid
$url->connect("$url", "$path"); //connect the $url with $path to a new string url
$info = $url->getInfo("$url");
$protocol = $info['protocol']; //get the protocol
$port = $info['port']; //get the port
$domain = $info['domain']; //get the domain