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
  • 24,740
  • 6
  • 54
  • 63
santa
  • 12,234
  • 49
  • 155
  • 255
  • 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
  • 868,454
  • 176
  • 1,908
  • 1,964
0

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

shox
  • 1,150
  • 5
  • 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
  • 26,884
  • 9
  • 56
  • 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
  • 18,120
  • 9
  • 61
  • 77