how to detect domain name?

They have: 5 posts

Joined: Nov 2004

Anyone knows how to detect domain name in address bar in php script? Let say I set a few domain names as domain alias to my main domain name, when I key in one of them in browser address bar. How or is that possible to return a value in php script to detect the exact domain name (domain name only not full url) which I key in?

chrishirst's picture

He has: 379 posts

Joined: Apr 2005

$_SERVER["HTTP_HOST"]'

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.