Google Community
Latest Forums Rules Resources
Custom Search

Go Back   Google Community > Google Forums > Google AdWords & AdSense Forum

GoogleCommunity Sponsor
Cirtex Hosting
Use coupon "forum" for 50% Off!

Reply
 
LinkBack Thread Tools Display Modes
Old 11-27-2006, 12:45 PM   #1 (permalink)
Junior Googler
 
Join Date: Mar 2006
Location: Uk
Posts: 43
Thanks: 0
Thanked 1 Time in 1 Post
foottuns
Send a message via AIM to foottuns Send a message via MSN to foottuns Send a message via Yahoo to foottuns
how to block certain ip's to adsense

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?
foottuns is offline   Reply With Quote
 
Sponsored Links
Old 11-30-2006, 03:15 AM   #2 (permalink)
Senior Googler
 
Join Date: Sep 2006
Location: Heaven
Posts: 157
Thanks: 0
Thanked 0 Times in 0 Posts
angel2017
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 = ''
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
angel2017 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
any one can block any one Website's Google Adsense iumer Google AdWords & AdSense Forum 11 10-18-2006 08:57 PM
Text flwoing round Adsense block - how? Woody60 Google AdWords & AdSense Forum 4 05-14-2006 07:36 AM
New Kid on da Block darrelld Introduce Yourself 10 10-21-2005 01:56 AM
new kid on da block playvibes Introduce Yourself 3 09-11-2005 10:25 AM


All times are GMT -8. The time now is 12:17 PM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0
© 2004–2007 Google Community