I have been using the following to discover the full url, but it does not detect the subdomain I am calling from.
$current_url = "http://".$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"]."";
echo $current_url;EXIT;
Any advice?
I have been using the following to discover the full url, but it does not detect the subdomain I am calling from.
$current_url = "http://".$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"]."";
echo $current_url;EXIT;
Any advice?
$_SERVER['HTTP_HOST'] should include the subdomain. Can you link us to an example page?
Tested and works fine for me. Used this code:
<?
$current_url = "http://".$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"]."";
echo $current_url;EXIT;
?>