Can I detect IE6 with PHP?

PHLAK picture PHLAK · Mar 23, 2009 · Viewed 44.1k times · Source

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

Answer

Jeremy Ruten picture Jeremy Ruten · Mar 23, 2009

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.