edbox / valid-url
Simple class to cast all what is needed about url string. Host, Ip, validation, domain, etc..
Installs: 26
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/edbox/valid-url
Requires
- php: >=5.6.0
This package is auto-updated.
Last update: 2025-12-10 10:10:30 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.