|
Posted by Rik Wasmus on 01/05/08 13:46
On Sat, 05 Jan 2008 12:04:39 +0100, Jason Carlton <jwcarlton@gmail.com>
wrote:
> My question is, is this the best way to find which domain has been
> entered?
Yes, at least in Apache with PHP as a module it is.
> Also, considering that I'm always battling speed issues on my
> site, is there a faster option than $_SERVER['HTTP_HOST']?
$_SERVER['HTTP_HOST'] is an automatically filled string allready available
to you, anything faster is almost impossible. When trying to optimise, be
sure to check where the bottlenecks are, don't guess. A variety of tools
is available to you, I prefer XDebug.
About the (pseudo?) code, I'd say you're better of using a switch
statement then an if..else if...else if.. construct.
--
Rik Wasmus
Navigation:
[Reply to this message]
|