Read this tutorial, you can get current web page url from your web browser using php:
1. You will learn some variables to get full url from address bar.
- $_SERVER[‘HTTP_HOST’]
- $_SERVER[‘REQUEST_URI’]
- $_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.
Hope this helpful!