Search code examples
phpinternet-explorer-6cross-browser

Can I detect IE6 with PHP?


Is there a way to use PHP to detect if the page is being loaded using IE6?


Solution

  • Try checking their user agent for 'MSIE 6.'.

    $using_ie6 = (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 6.') !== FALSE);
    

    This is based on this user agent information.