Forum Moderators: coopster
$_SERVER['HTTP_HOST'] should give you the full domain that was requested, so "www.example.com" or "sub1.example.com". $_SERVER['SERVER_NAME'] should give you the same value. Since there are two separate variables, I suppose it is possible they would be different, although I don't know any examples of when that would be the case.
[php.net...] will give you a list of predefined variables, in case you want to pull other URL information.
Chad
[edited by: coopster at 10:38 pm (utc) on Aug. 29, 2005]
[edit reason] fixed link [/edit]