How can I get full URL in PHP
You can try following
'http' . (isset($_SERVER['HTTPS']) ? 's' : '') . '://' . "{$_SERVER['HTTP_HOST']}/{$_SERVER['REQUEST_URI']}"
$_SERVER[‘HTTPS’] : returns the actual value of either empty or “on”.
$_SERVER[‘HTTP_HOST’] : Contents of the Host: header from the current request, if there is one.
$_SERVER[‘REQUEST_URI’] : The URI which was given in order to access this page; for instance, ‘/index.php’.