Wednesday, June 1, 2011

PHP Code Snippet - Get domain name script is on

$domainScriptIsOn = $_SERVER['SERVER_HOST'];

echo $domainScriptIsOn;

?>
Description: Simple script that gets the domain that the user is currently on

No comments:

Post a Comment