HTTP_HOST will contain the full host name used to access the site, including the optional port number. However, on some misconfigured servers, HTTP_HOST will not be defined, in which case the script will attempt to reconstruct the host name from SERVER_NAME, and if necessary, SERVER_PORT.