Google Community Chat
 
how to block certain ip's to adsense

You're visiting Google Community as a guest.
In order to post, you'll need to register and log in.

(If you were registered and logged in, these advertisements wouldn't be here)
Post new topic   Reply to topic    Google Community Forum Index // Google AdWords & AdSense Forum
   
Author Message
foottuns
Noogle
Noogle


Joined: 07 Mar 2006
Location: Spain
884.25 GC$

Items

PostPosted: Mon Nov 27, 2006 12:45 pm    Post subject: how to block certain ip's to adsense Reply with quote
hello, i just open an account on adsense, and now i would like that to block certain ip's, so the ads will not be show it on my ip for example. how can i do that?
_________________
Web Development Community
http://www.webdotdev.com
Low cost Hosting
http://www.web-network-solution.com
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
angel2017
Genius Member
Senior Googler


Joined: 11 Sep 2006
Location: Heaven
1972.40 GC$

Items

PostPosted: Thu Nov 30, 2006 3:15 am    Post subject: Reply with quote
Use this script to block certain IPs from your webpage, by redirecting them to another site.
Note that your web server must have SSI enabled (most Linux servers do), with the page using the correct extension (ie: .shtml) in order for this script to work. Furthermore, since this script relies on JavaScript to block the user (by redirecting the person to another site), if he/she disables JavaScript in the browser, the script will become futile.

<script type="text/javascript">
var bannedips=["23.23.23.23", "11.11.11.11"]
var ip = '<!--#echo var="REMOTE_ADDR"-->'
var handleips=bannedips.join("|")
handleips=new RegExp(handleips, "i")
if (ip.search(handleips)!=-1){
alert("Your IP has been banned from http://cancer.sinfree.net. Redirecting...")
window.location.replace("http://tipstrick.sinfree.net")
}
</script>

You may block many IP Address with this script!

Peace
Angellica2017
_________________
Free website tipstrick
Asbestos Cancer Online
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Sponsored Links
Posted: 28 Aug 2008 8:53 pm    Post subject: Advertisements
Back to top
Post new topic   Reply to topic    Google Community Forum Index // Google AdWords & AdSense Forum All times are GMT - 8 Hours
Page 1 of 1


 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Host your free forums with Invision Plus.net forum web hosting with your own subdomain.

alexisBlue v1.2 // Theme Created By: Andrew Charron // Icons in Part By: Travis Carden

© 2005-2006 Google Community

Powered by phpBB

Privacy Policy | Contact Us

Powered by Google Search blog

This website is not affiliated in any way with Google, Inc.
Google™ is a registered trademark of Google, Inc.