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

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]


Удаленная работа для программистов  •  Как заработать на 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

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