Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- //http://www.anyexample.com/programming/php/how_to_detect_internet_explorer_with_php.xml
- function ae_detect_ie()
- {
- if (isset($_SERVER['HTTP_USER_AGENT']) &&
- (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false))
- return true;
- else
- return false;
- }
- if(ae_detect_ie())
- {
- header("Location: noie.html");exit;
- }
- function isOldMobileSafari()
- {
- $browserAsString = $_SERVER['HTTP_USER_AGENT'];
- if (strstr($browserAsString, " AppleWebKit/") && strstr($browserAsString, " Mobile/")&& strstr($browserAsString, "4_2"))
- {
- return true;
- }
- else
- {
- return false;
- }
- }
- ?>
- <div id="header">
- <div id="topred"> </div>
- <div id="topgreen"> </div>
- <div id="topblue"> </div>
- <div id="topyellow"> </div>
- <a style="display:none" href="https://plus.google.com/118197810020432218051?rel=author">G+</a>
- </div>
- <script defer="defer">
- //detect IOS version < 5, if yes, hide the footer since fixed pos does not work
- var isOldMobileSafari = '<?= isOldMobileSafari(); ?>';
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement