edbox / valid-url
There is no license information available for the latest version (v1.0.1) of this package.
Simple class to cast all what is needed about url string. Host, Ip, validation, domain, etc..
v1.0.1
2020-09-09 16:58 UTC
Requires
- php: >=5.6.0
This package is auto-updated.
Last update: 2024-06-10 06:46:34 UTC
README
This package depends on parse_url
, gethostbyname
php functions. It provides a simple way to cast all what is needed about url string:
- Domain
- Ip
- Prefix
- Validation
- etc.
Getting Started
Install
Run the following command:
composer require edbox/valid-url
Usage
$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() );
Credits
License
The MIT License (MIT). Please see LICENSE for more information.