To check the user agent and some browser capabilities you only need to check the user agent info PHP receives from the client request (as
$_SERVER['HTTP_USER_AGENT'] if I'm not mistaken) and then pass that to
get_browser() to parse it, then tailor the content as you wish, with warnings, red cards, etc.
For a very simple example of yellow- or red-carding a very horrible browser such as Internet Explorer you can see for example the source of my
plugin noiewarning (disclaimer: shameless self promotion because I think it's well justified) or, even better, the source of the no-ie plugins for Wordpress (disclaimer: shameless non-self promotion also well justified) which were used as a foundation for it. The original "Shockingly Big Warning" is very good and can do anything from presenting a small warning, a full-screen warning or even
crashing IE to demonstrate its brokenness if desired.