in case $_SERVER['HTTP_HOST']) is not set let's return localhost - better than nothing
use $_SERVER['SERVER_NAME'] in case $_SERVER['HTTP_HOST'] is not set