Get URL + URI of Current Page Using PHP

When you need to get the current URL + URI of the current page. ┬áThat means that it’ll also get the parameters in the URL (ie: http://yoursite.com/?this=that&thistoo=thattoo).


$currenturl = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];

Follow: