In this tutorial, you'll learn how to get current web page url from your web browser address bar using php script.
PHP Code:
<?php
$url
="http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
echo 
$url;
?>

$_SERVER['HTTP_HOST']
this function will show only server name.
$_SERVER['REQUEST_URI'] this function will show you the path to file of your url.