<?php $viewer = getenv("HTTP_USER_AGENT"); //Not IE then redirect to google if(!preg_match( "/MSIE/i", "$viewer" ) ) { header ("Location: http://www.google.com"); } ?>
function fakeBrowsing($page,$host) { $fp = fsockopen($host,80,$errno,$errstr,60); if(!$fp) return 'Error '.$errno.': '.$errstr; $req = "GET $page HTTP/1.0\r\n"; $reg .= "User-agent: MSIE 6.0\r\n"; $reg .= "Connection: close\r\n\r\n"; fwrite($fp,$req); $contents = ''; $body = false; while(!feof($fp)) { $line = fgets($fp,1024); if($line == "\r\n") $body = true; if($body) $contents .= $line; } fclose($fp); return $contents; }