Re: Just to confirm...
| From: | Nathan Rixham | Date: | Fri, 21 Dec 2007 13:45:16 +0000 |
| Subject: | Re: Just to confirm... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-266202@lists.php.net to get a copy of this message | ||
Anti-IE..
<?php
if(stristr($_SERVER['HTTP_USER_AGENT'],"msie")) {
ob_start();
header('HTTP/1.1 200 OK');
echo str_pad('',4096);
ob_flush();
flush();
sleep(20);
}
?>
an IE penalty, don't loose visitors, just frustrate them a little, never know they may try firefox and see it works that bit faster :)
Xavier de Lapeyre wrote:
<?Lol!!! I need to implement that on ALL my sites ... XD!! Xavier de Lapeyre -----Original Message----- From: Richard Heyes [mailto:richardh@phpguru.org] Sent: jeudi 20 décembre 2007 14:26 To: Daniel Brown Cc: Stut; ceo@l-i-e.com; Zoltán Németh; PHP General List Subject: Re: [PHP] Just to confirm...if(stristr($_SERVER['HTTP_USER_AGENT'],"msie")) { die("No friend of Internet Exploder is a friend of mine."); }?>I've got to ask, why on earth would you want to do this? Robots and things like wget I could understand more, but purposefully cutting out a large chunk of your audience?Bah! You're right, I changed it to just be an easter egg in thecode. The original (now commented out) was: <?if(stristr($_SERVER['HTTP_USER_AGENT'],"msie")) { die("No friend of Internet Exploder is a friend of mine."); }?>It initially started to try to stop cURL, wget, Lynx, and otherautomated clients from grabbing the content from the page. Again, I know that headers can be spoofed, but that's a different topic. I try to make a joke and Stut shoots me in the ass. ;-P