Here is a code to detect weather the visitor if your webpage is using ie or not:
1 2 3 4 5 6 7 8 | if (isset($_SERVER['HTTP_USER_AGENT']) && (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false)) { echo "You are using ie"; } else { echo "You are not using ie"; } |
I am using this simple PHP code while developing HybridPass, a new authentication tool for web applications. My Javascript is only compatible with ie at the moment, so until I develop it more to support other browsers it is important to give my visitors the right feedback.
