Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Block internet explorer php
<?php
preg_match('/MSIE (.*?);/', $_SERVER['HTTP_USER_AGENT'], $matches);
if(count($matches) < 2)
{
preg_match('/Trident\/\d{1,2}.\d{1,2}; rv:([0-9]*)/', $_SERVER['HTTP_USER_AGENT'], $matches);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment