how detect ie7 or ie8 with php and every language

In daily development we face lot of cross browser issues and sometimes conditional css will never work as excepted. We can detect I7 and I8 browser using every language. Using PHP language I need to use the browser So I written following code.

How to detect ie7 or ie8 with php

We can detect ie7 or ie8 with php and every language. Using PHP language I need to use browser So I written code snippet which is useful for PHP developer.

In this article I will show how to detect IE browser and IE 7 and IE8 using php language.

Following function you can use for detecting the IE browsers.


function detect_ie($navigator_user_agent)
{
 if (stristr($navigator_user_agent, "MSIE"))
 {
 return true;
 } else return false;
}

detect_ie($_SERVER['HTTP_USER_AGENT']);

//detect IE7 browser

function detect_ie7($navigator_user_agent)
{
 if (stristr($navigator_user_agent, "msie 7"))
 {
 return true;
 } else return false;
}

detect_ie7($_SERVER['HTTP_USER_AGENT']);

function detect_ie8($navigator_user_agent)
 {
 if (stristr($navigator_user_agent, "msie 7"))
 {
 return true;
 } else return false;
 }

detect_ie8($_SERVER['HTTP_USER_AGENT']);

How to detect ie7 or ie8 with php
How to detect ie7 or ie8 with php

How to Install IE6 and IE7 on Fedora

Here in this article we will guide you to Install IE6 and IE7 on Fedora or any linux system. Now days I6 and IE7 is not used by people still I am updating this post.

Note: Don’t became root because these files will crash your linux.

Use following commands for installing the IE7 on your box.
#su
#ROOT_PASSWORD
#yum install wine cabextract
#exit
Here we are exiting the root user

#cd /tmp
#wget http://www.tatanka.com.br/ies4linux/downloads/ies4linux-latest.tar.gz
#tar xvfz ies4linux-latest.tar.gz
#cd ies4linux-*
#./ies4linux –no-flash –install-ie7

I tried following command multiple times than I got succeed(6 or 7 times). Many times this command not executed properly.
#./ies4linux –no-flash –install-ie7

To launch IE6 Type on command prompt:
#ie6

To launch IE7 Type on command prompt:
#ie7

My comments
IE6 and 7 is running properly on my machine but some time it gives me error about IE7.
I am looking forward to solve that issue.