I added this to my pages today:
zango_detect.php - PHP file
Code:
<?php
if ( stristr ( $_SERVER['HTTP_USER_AGENT'], "zango" ) ):
?>
<div id="zango_warning" style="font-family:Arial, Helvetica, sans-serif; font-size: 23px; color: #FFFFFF; background: #f0310b; padding: 10px; width: 600px; position: absolute; left: 50%; top: 50%; margin-top: -38px; margin-left: -300px; z-index:9999; text-align: left;">
<a href="javascript:;" onClick="javascript:document.getElementById('zango_warning').style.display='none';" style="font-size: 11px; color: #fff; float: right; text-decoration: underline;"><strong>close</strong></a>
<strong>WARNING: </strong>Your computer is affected with Zango<br />
Learn how to <a href="http://www.adwaresucks.com/zango/" style="color: #fff; font-weight: bold; text-decoration: underline;" target="_blank">completely remove it from your PC</a> </div>
<?php
endif;
?>
and I also added this to my domain root folder's
.htaccess file:
Code:
php_value auto_append_file "/path/to/zango_detect.php"
Of course you should replace /path/to/ with the actual path to your script. A few notes:
This won't work if a the loaded PHP script (
http://site.com/page.php) has executed one of those:
Code:
exit;
exit();
die();
I'm sure you get the picture.
You could
auto_prepend_file the script, but it will crash if you have a header("anything") or setcookie() - i.e. if you modify the HTTP headers.
It's a lame ass solution, but it has a close button on it, it works on almost every page without modification, it's save script/HTML wise and it still allows your surfers to see your content. That way poor surfers who have no idea wtf is going on won't be redirected, even tho nobody's using Zango to advertise on your pages.