Last active
December 22, 2015 05:39
-
-
Save JonnyNineToes/6425722 to your computer and use it in GitHub Desktop.
Get top level domain with PHP. The code should return ".com", depending on what website you're on, and can be customized for other top level domains (useful for development if you have a ".dev" domain set up on your local machine).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
end(explode('.', $_SERVER['SERVER_NAME'])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment