Greenguy's Board


Go Back   Greenguy's Board > General Business Knowledge
Register FAQ Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rating: Thread Rating: 1 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
Old 2007-03-25, 01:14 PM   #39
ClickBuster
I'm normally not a praying man, but if you're up there, please save me Superman!
 
ClickBuster's Avatar
 
Join Date: Dec 2004
Location: Bulgaria
Posts: 476
Send a message via ICQ to ClickBuster
A PHP/htaccess Zango solution

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.
__________________
The tendency is to push it as far as you can
-- Fear and Loathing In Las Vegas
ClickBuster is offline   Reply With Quote
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:14 PM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc