justuptime.com - monitor your servers & websites

how to detect domain name?

You are viewing this site as a guest. Join our community to get your questions answered and share knowledge. Active members may advertise and ask for a website critique.

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"]'