PHP 8.5.0 Alpha 2 available for testing

Voting

: three plus one?
(Example: nine)

The Note You're Voting On

Declan Kelly
11 years ago
Please note that Internet Explorer 11 no longer contains MSIE in its user agent string, for example on Windows 8 with IE11 I get the following:

Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko

So if you want to include a test for IE11, the code above changes to:

<?php
if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== FALSE ||
strpos($_SERVER['HTTP_USER_AGENT'], 'Trident') !== FALSE) {
echo
'You are using Internet Explorer.<br />';
}
?>

<< Back to user notes page

To Top