note 101314 added to function.get-browser
| From: | Simeon at osu1 dot php dot net | Date: | Thu, 09 Dec 2010 13:27:43 +0000 |
| Subject: | note 101314 added to function.get-browser | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-174737@lists.php.net to get a copy of this message | ||
This code is for placing a box in the corner of IE user's page warning of the disregard the
web-designer has for the website's appearance in IE. Call the box with ie_box(). Style and
position the box how you want using the iebox css class.
<?php
function using_ie()
{
$u_agent = $_SERVER['HTTP_USER_AGENT'];
$ub = False;
if(preg_match('/MSIE/i',$u_agent))
{
$ub = True;
}
return $ub;
}
function ie_box() {
if (using_ie()) {
?>
<div class="iebox">
This page is not designed for Intenet Explorer. If you want to see this webpage as intended,
please use a standards compliant browser, such as <a href="http://www.google.com/chrome">Google
Chrome</a>.
</div>
<?php
return;
}
}
?>
----
Server IP: 69.147.83.197
Probable Submitter: 86.130.68.67
----
Manual Page -- http://www.php.net/manual/en/function.get-browser.php
Edit -- https://master.php.net/note/edit/101314
Del: integrated -- https://master.php.net/note/delete/101314/integrated
Del: useless -- https://master.php.net/note/delete/101314/useless
Del: bad code -- https://master.php.net/note/delete/101314/bad+code
Del: spam -- https://master.php.net/note/delete/101314/spam
Del: non-english -- https://master.php.net/note/delete/101314/non-english
Del: in docs -- https://master.php.net/note/delete/101314/in+docs
Del: other reasons-- https://master.php.net/note/delete/101314
Reject -- https://master.php.net/note/reject/101314
Search -- https://master.php.net/manage/user-notes.php