Re: Redirecting to index.php from index.html
| From: | David Nicholson | Date: | Tue, 17 Jun 2003 22:09:43 +0000 |
| Subject: | Re: Redirecting to index.php from index.html | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-151913@lists.php.net to get a copy of this message | ||
Hello,
This is a reply to an e-mail that you wrote on Tue, 17 Jun 2003 at 22:27,
lines prefixed by '>' were originally written by you.
> Oops. Typos. Try this:
> if(strstr($HTTP_USER_AGENT, "Mozilla/4")){
> header("Location:
> http://www.mydomain.com/moz4_page.php");
> elseif(strstr($HTTP_USER_AGENT, "MSIE")){
> header("Location:
> http://www.mydomain.com/ie_page.php");
This doesn't really matter as in this case the performance difference
wouldn't be noticable but I thought I would point out anyway...
On the strstr manual page it states:
"Note: If you only want to determine if a particular needle occurs
within haystack, use the faster and less memory intensive function
strpos() instead."
All the best,
David
--
phpmachine :: The quick and easy to use service providing you with
professionally developed PHP scripts :: http://www.phpmachine.com/
Professional Web Development by David Nicholson
http://www.djnicholson.com/
QuizSender.com - How well do your friends actually know you?
http://www.quizsender.com/
(developed entirely in PHP)