Unstoppable Domains โ€” AI Assistant

Fast, easy PHP/ IE8 question

SpaceshipSpaceship
Watch
What is the correct code to "do something different" for people who use IE <9. All I need is the most dependable browser detection. Like this:

PHP:
<?php

if (ie < 9 "what goes here instead of 'ie < 9'") { 
place code here for older IE users ; }
?>

Thanks

EDIT:
Let's change the question to "what is your favorite method?"
Looks like there are "many false positives in parsing the $_SERVER["HTTP_USER_AGENT"] for IE6"
 
Last edited:
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
Unstoppable Domains โ€” AI StorefrontUnstoppable Domains โ€” AI Storefront
IE detection is indeed very useful in some cases as this browser is known for causing many related to the html standard problems and breaking our beautiful styles. :)

I do it that way:
if(strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE')!==false) $ie=1; else $ie=0;

As for detecting some particular IE version, you can use:
if(strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 6.')!==false) $ie=6; else $ie=0;
 
0
•••
Appraise.net
Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
NameMaxi - Your Domain Has Buyers
DomDB
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back