Get the full url of the page in php

PHP
$fullURL = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
Source

Also in PHP: