Created
July 20, 2018 18:12
-
-
Save mauriciopazpp/f38bdcc7afef075819bd397de06b375c to your computer and use it in GitHub Desktop.
Block internet explorer php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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