PHP Block Internet Explorer.
Code:
<?php
if (eregi("MSIE",getenv("HTTP_USER_AGENT")) ||
eregi("Internet Explorer",getenv("HTTP_USER_AGENT"))) {
Header("Location: http://gamesave.hdhost.in:81/reject.html");
exit;
}
?>
put this in index.php and they cannot access your site using internet explorer. and if you want to block them from ALL of your pages create block.php stick it inside there then do: <? include('block.php'); ?>
real simple and fast :D
Re: PHP Block Internet Explorer.
Here are some other easy ways to redirect or block Internet Explorer; (1) using IE html conditionals, (2) using Javascript. Each of these can be run before page load and should be put in the html Head.
HTML IE Conditional (possibly only supported in IE)
Code:
<!--[if IE]>
<meta http-equiv="Refresh" content="0;url=iepage.html" />
<![endif]-->
Javascript
Code:
<script type="text/javascript">
if (navigator.appName == "Microsoft Internet Explorer") {
window.location = "iepage.html";
}
</script>
Re: PHP Block Internet Explorer.
Javascript can be blocked by the user, you cant block mine :)
Re: PHP Block Internet Explorer.
Copy and pasting these into my notepad for later use :D ty