1

I use SVG Charts on my website. It works in all browsers except IE. I would like to add a snippet of PHP code with a message for IE users.

I think I can get the agent info with PHP, but I'm not sure how to detect version. I believe IE 9 supports it now, so I need only for versions below IE 9.

Bennett McElwee
  • 23,305
  • 6
  • 51
  • 61
santa
  • 11,716
  • 43
  • 149
  • 239
  • This (http://stackoverflow.com/questions/671890/can-i-detect-ie6-with-php) can be useful for you?? – Galled Oct 12 '11 at 19:29

4 Answers4

2

You don't need PHP for this.

Instead, use conditional comments.

SLaks
  • 837,282
  • 173
  • 1,862
  • 1,933
0

Try this : http://php.net/manual/en/function.get-browser.php

shox
  • 1,130
  • 4
  • 18
  • 32
0

You could use the PHP function get_browser. See here.

The site contains numerous examples of how to detect the browser and display an appropriate message.

Ryan
  • 24,944
  • 9
  • 54
  • 83
0

Put this around the html

<![if lt IE 9]> 
    Show stuff to browsers => IE 9
<![endif]-->
<!--[if lt IE 9]> 
    hide stuff from browsers < IE 9
<![endif]-->
vascowhite
  • 17,726
  • 9
  • 57
  • 75