View Single Post
Old 07-28-2001, 04:10 AM   #13
funtoon
Registered User
 
Join Date: Apr 2001
Location: India
Posts: 402
Default if anyone is using ASP you can use this code snippet

Hi I just wrote this code its in ASP to block users using ad-blocking softwares and offline browsers, feel free to use it


<%
agent=lcase(Request.ServerVariables("HTTP_USER_AGE NT"))

banned_agents="offline,webzip,webreaper,anarchie,m *** \ down,blackwindow,web********,teleport,webwasher,ad subtract,offline explorer,superbot,wget,ia_archiver,libwww,httrack, fetch,muncher"
b_agents=split(banned_agents,",")

for cnt=0 to ubound(b_agents)
if instr(agent,b_agents(cnt)) > 0 then
Response.Write "<font face=verdana size=2><B><center>Sorry you are not allowd to view this page</b></center><P>"
Response.Write "We have determined that you are using some sort of ad-blocking software or using a browser that downloads our site to your machine.<P> Please understand that we are able to provide this content free because of our Sponsors (ads) and if you choose to block them, we will be unable to display the pages, if people continue to block our sponsors ads using ad-blocking softwares then we will be forced to charge for the content and we do not wish to do this so Please shut of your ad-blocking software and revisit our site."
Response.Write "<P>Thanks,<BR> Editor <BR> http://www.funtoosh.com [ <a href=mailto:webmaster@funtoosh.com>webmaster@funto osh.com </a> ]"
Response.Write "</font></body></html> "
Response.End
end if

NEXT
%>


I hope this help you all

Thanks,
Ranjit Editor Funtoosh Network
funtoon is offline