John Nichel wrote:
Okay, I'm sitting at home, writing a bit of code for one of my personal
sites, and I'm currently working on a function to detect different
browser types. Well, I think I have the URL to a page on one of my
boxes which echo's out the HTTP_USER_AGENT in my clipboard. However,
what I have there is....
elseif ( preg_match ( "/Firefox/", $_SERVER['HTTP_USER_AGENT'] ) ) {
Well, I paste this into Firefox's URL bar and hit enter before my brain
can tell my hands that this is not what I want to do. Do I get a "could
not find server" error from Firefox? Nope. It forwards me to this
page....
http://itangersjack.com/oddball/cheese.htm
Nothing really special about the page, except it's revealing source code
to something I'm currently working on (not in the way I'm doing it, but
it's there). Okay, it's late, and I'm easily amused. ;)
BTW, you should really use
strstr($_SERVER['HTTP_USER_AGENT'], 'Firefox');
or stristr
--
paperCrane <Justin Patrin>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php