wordpress_add

Friday, 11 October 2013

Easy Method to Check browser In PHP...!!!

Here is the code to check the browser Either it is internet explorer or some other browser. 


<?php

$user_agent = $_SERVER['HTTP_USER_AGENT']; 

if (preg_match('/MSIE/i', $user_agent)) { 
   echo "Internet Explorer";   // HERE you can set any condition which you only execute in IE case
} else {
   echo "Non-IE Browser";


?>


Subscribe Dr-Wordpress for Important Knowledge of word press..your's suggestions are most welcomed.

No comments:

Post a Comment