PHPackages                             tdt/uri - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. tdt/uri

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

tdt/uri
=======

Did you ever try to get the current URI in PHP? This should do the trick.

146PHP

Since Jun 19Pushed 12y ago5 watchersCompare

[ Source](https://github.com/tdt/uri)[ Packagist](https://packagist.org/packages/tdt/uri)[ RSS](/packages/tdt-uri/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

uri
===

[](#uri)

Ever wanted to get the right request URI/URL in PHP? This should do the trick

API
---

[](#api)

```
$ruri = $RequestURI::getInstance();
$ruri->getProtocol(); //returns http or https
$ruri->getHostname(); //returns the hostname
$ruri->getFilters(); //return the path as an array
$ruri->getGET(); //all GET parameters in an associative array
$ruri->getGivenFormat(); //when you add a .json to the end of the URI
$ruri->getRealWorldObjectURI(); //return URI without a format or without GET params
$ruri->getResourcePath(); //the path to the resource
$ruri->getURI(); //realworld object URI plus format and get params. The full URI.
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/af95b988ec0a5527b14f7ff9d0c3c43b0b89f0abaff5b741f6be4c37aaebe4b8?d=identicon)[pietercolpaert](/maintainers/pietercolpaert)

---

Top Contributors

[![coreation](https://avatars.githubusercontent.com/u/361244?v=4)](https://github.com/coreation "coreation (2 commits)")[![pietercolpaert](https://avatars.githubusercontent.com/u/347073?v=4)](https://github.com/pietercolpaert "pietercolpaert (1 commits)")

### Embed Badge

![Health badge](/badges/tdt-uri/health.svg)

```
[![Health](https://phpackages.com/badges/tdt-uri/health.svg)](https://phpackages.com/packages/tdt-uri)
```

###  Alternatives

[umpirsky/composer-permissions-handler

Composer script handling directories permissions by making them writable both by the web server and the command line user.

6630.3k](/packages/umpirsky-composer-permissions-handler)[dktapps/pmforms

Form API library for PocketMine-MP plugins

522.3k1](/packages/dktapps-pmforms)[foolz/plugin

A plugin system for PHP, with cascading events.

542.1k1](/packages/foolz-plugin)[hexadog/laravel-menus-manager

Dynamic Menus Management package for your Laravel application

184.5k](/packages/hexadog-laravel-menus-manager)[melios/page-builder

Improvements for the built-in Magento PageBuilder module

131.4k](/packages/melios-page-builder)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
