PHP code example of edbox / valid-url
1. Go to this page and download the library: Download edbox/valid-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/ */
edbox / valid-url example snippets
$url = 'https://www.example.com/index.php?request=product_cat&product_info=22726';
$object = new Edbox\Tools\ValidUrl($url);
// or
// $object = (new Edbox\Tools\ValidUrl)->setUrlString($url);
var_dump(
/**
* Available get methods
*/
$object->toArray()
// $object->getPrefix()
// $object->getDomain()
// $object->getUniqDomain()
// $object->getPath()
// $object->getQuery()
// $object->getFragment()
// $object->getIp()
// $object->isValid()
);