You are here: Better option than $_SERVER['HTTP_HOST'] « PHP Programming Language « IT news, forums, messages
Better option than $_SERVER['HTTP_HOST']

Posted by Jason Carlton on 01/05/08 11:04

I have several domains parked over my primary domain, and based on
which domain is typed in the content changes slightly for each page
(title bar, keywords, little things like that). But, I'm having a few
minor issues.

Every page calls a variables.php (where all of the variables are set
at once), which goes like:

// www.parkdomain1.com
if (strpos($_SERVER['HTTP_HOST'], "parkdomain1")) {
// set variables
}

// www.parkdomain2.com
else if (strpos($_SERVER['HTTP_HOST'], "parkdomain2")) {
// set variables
}

// www.actualdomain.com
else {
// set variables
}


My question is, is this the best way to find which domain has been
entered? Also, considering that I'm always battling speed issues on my
site, is there a faster option than $_SERVER['HTTP_HOST']?

TIA,

Jason

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация