How to get domain name of site from within a block?

Permalink
I have a block inside a package for the marketplace. How can I echo out the domain name of the site that the package is installed on? I just need the "example.com" (it cannot include the www. or any sub-domain).

Thanks

phatworks
 
LucasAnderson replied on at Permalink Best Answer Reply
LucasAnderson
There are certain constants within each concrete5 install that are defined in the config files.

What you're probably looking for is BASE_URL or DIR_REL

echo BASE_URL; should get you the domain, but you may need to play with it a bit to format how you want it.