midnite81/urlparser

A PHP 7.1+ package to parse urls

v1.0.3 2023-03-13 22:59 UTC

This package is auto-updated.

Last update: 2024-07-14 01:53:01 UTC


README

Latest Stable Version Total Downloads Latest Unstable Version License Build Coverage Status
A PHP 7.1+ URL parser for easy manipulation of URLs

Installation

This package requires PHP 7.1+.

To install through composer include the package in your composer.json.

"midnite81/urlparser": "^1.0"

Run composer install or composer update to download the dependencies or you can run composer require midnite81/urlparser.

Example Usage

<?php 

include '/path/to/vendor/autoload.php';

$url = new Midnite81\UrlParser\Url('http://example.com/gallery/houses?hiRes=1#forSale');

echo $url->path(); // returns '/gallery/houses'
echo $url->fileName() // returns 'houses'

Available Methods