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 $_SERVER['HTTP_HOST']
, it comes from client so I can't trust this information (it can be rewritten, I think).
PS: I've read this post : How reliable is HTTP_HOST? but I did not find any response (maybe I did not search correctly...)