Is there a php function that returns the current domain of the browser? I have the index.php file that is used by two domains ".com" and ".ca". I want to check in the index.php file if the user is coming from the ".com" domain or ".ca" domain and pass values based on that domain?
Any way I can do this?
$HTTP_SERVER_VARS[HTTP_HOST];
ahh..
well.. take the result and split it.
list($www,$name,$extension) = split(".",$HTTP_SERVER_VARS[HTTP_HOST],3);
Something like that should work for you...
$extension would then be... .com or .ca etc..