title: What alternative to HTTP_HOST can I use?
body: <p>I have to display current server host (in PHP, but it is not very important). I don't know on which host I am.
  How can I do that without security issue ? If I use <code>$_SERVER['HTTP_HOST']</code>, it comes from client so I can't trust this information (it can be rewritten, I think).</p>
  
  <p>PS: I've read this post : <a href="https://stackoverflow.com/questions/4096151/how-reliable-is-http-host">How reliable is HTTP_HOST?</a> but I did not find any response (maybe I did not search correctly...)</p>