Skip to content

Instantly share code, notes, and snippets.

@0xnbk
Created September 17, 2010 03:57
Show Gist options
  • Save 0xnbk/583662 to your computer and use it in GitHub Desktop.
Save 0xnbk/583662 to your computer and use it in GitHub Desktop.
Show IE Warning Message
<?php
//if the browser is Microsoft IE
if (strstr($_SERVER['HTTP_USER_AGENT'], "MSIE")) {
//if (ereg('MSIE 6',$_SERVER['HTTP_USER_AGENT']))
echo "Your Error Message Here";
}?>
@0xnbk
Copy link
Author

0xnbk commented Sep 17, 2010

PHP snippet to detect if the browser is IE, and display a simple message. Uncomment line 4 to detect JUST IE 6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment