2017 © Pedro Peláez
 

library uri

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

image

tdt/uri

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

  • Wednesday, June 19, 2013
  • by pietercolpaert
  • Repository
  • 5 Watchers
  • 1 Stars
  • 41 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

uri

Ever wanted to get the right request URI/URL in PHP? This should do the trick, (*1)

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.

The Versions

19/06 2013

dev-master

9999999-dev http://thedatatank.com

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

  Sources   Download

AGPLv3

uri url iri urn