PHP: Blocking Browsers
by Zildjian

Incredibly bored, so I thought I'd share something I wrote in PHP. 

I got fed up with people going on about Firebird or Firefox, Opera 
and Netscape being soooooo much better than MSIE, that I wrote a 
script that blocks the fuckers from looking at my web sites. 
Obviously I have it turned off for Grapevine :) 

Simple code, piece of piss really. 

To block a browser, you just search the $_SERVER['HTTP_USER_AGENT'] 
string for either Gecko, Firebird, Opera or MSIE. 

// Stop these moaning fuckers getting to the site!
if (strstr($_SERVER['HTTP_USER_AGENT'],"Opera")) {
// Do something here. In this example I redirect to another page.
header('Location: 404-browsers.php');
exit();
}


In my case I just change the first line to 

if (strstr($_SERVER['HTTP_USER_AGENT'],"MSIE") != true) { 

and that blocks all non-MSIE browsers, perfect for annoying the fuckwitts :) 
close window