NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page Fast, easy PHP/ IE8 question

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search
6 members in live chat ~  


Reply
 
LinkBack Thread Tools
Old 10-30-2011, 01:33 PM THREAD STARTER               #1 (permalink)
NamePros Regular
 
~ The 34 Year Buzz!!'s Avatar
Join Date: Aug 2006
Location: Cyberspace
Posts: 648
~ The 34 Year Buzz!! has much to be proud of~ The 34 Year Buzz!! has much to be proud of~ The 34 Year Buzz!! has much to be proud of~ The 34 Year Buzz!! has much to be proud of~ The 34 Year Buzz!! has much to be proud of~ The 34 Year Buzz!! has much to be proud of~ The 34 Year Buzz!! has much to be proud of~ The 34 Year Buzz!! has much to be proud of
 



Question Fast, easy PHP/ IE8 question


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 Code:
<?php
????: NamePros.com http://www.namepros.com/programming/735898-fast-easy-php-ie8-question.html

if (ie "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"
__________________
Are You Happy Today! :o)
Last edited by ~ The 34 Year Buzz!!; 10-30-2011 at 01:42 PM.
~ The 34 Year Buzz!! is offline   Reply With Quote
Old 11-12-2011, 11:38 AM   #2 (permalink)
NamePros Member
 
Kokoro's Avatar
Join Date: Aug 2010
Posts: 128
Kokoro is just really niceKokoro is just really niceKokoro is just really niceKokoro is just really nice
 



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;
Kokoro is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Scripteen - The Best PHP Scripts on the Web cyberoptik Scripts For Sale 57 12-17-2011 11:16 PM
[4HIRE] PHP / MySQL / Javascript - Frameworks and OOP alecksmart Developers For Hire 0 06-24-2011 12:47 AM
Looking for a PHP Developer for my team! domainpush Web Development Wanted 1 06-18-2011 06:51 PM

 
All times are GMT -7. The time now is 02:49 PM.

Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger