PHP Site URL
https://stackoverflow.com/questions/2820723/how-to-get-base-url-with-php
<?php
// to get the whole web url
echo "http://" . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
// to get the URL only (with no forward slash)
echo "http://" . $_SERVER['SERVER_NAME'] ;