Here is a simple ASP Code Snippet that Hides your AdSense by blocking or filtering your IP.
This part you would want at the top of a page:
<%
dim blockip
blockip = Request.ServerVariables("REMOTE_HOST")
%>
The following you place wherever your Ads would be:
A Single IP# Version:
<%
if blockip <> "000.000.000.000" then%>
<div align="center">
“Your AdSense Code here.” Note: Replace the 000.000.000.000 and 111.111.111.111 with the IP# you wish to block.
</div>
<%
else
"Show Something Else."
end if
%>
A Two IP # Version:
<%
if blockip <> "000.000.000.000" then
if blockip <> "111.111.111.111" then %>
“Your AdSense Code here.” Note: Replace the 000.000.000.000 and 111.111.111.111 with the IP# you wish to block.
<%
else
"Show Something at work."
end if
else
"Show Something at home."
end if
%>
Tags:
ASP Code Snippet
Block IP Address
Prevent AdSense Misclick
Reference
asp code snippet, block ip address, prevent adsense misclick