I was just wondering how reliable $_SERVER['HTTP_HOST'] is.
We are running three different sites, all the exact same, only using three different databases.
Right now, I am having to edit my include file to point to the correct database, among other things.
I was wondering if I could be 100% sure the sites would pick up the correct host, therefore picking up the correct database?
(ex.
if ($SERVER['HTTP_HOST'] == "site1")
{ $database = db1; }
elseif ($SERVER['HTTP_HOST'] == "site2")
{ $database = $db2; }
)
I know that some browsers block things like HTTP Referrer, and I know this is quite a bit different, but possibly something that could hang me up.
Any thoughts on the subject would be very helpful.
Thanks!
JAKE