| |
foottuns Noogle


Joined: 07 Mar 2006 Location: Spain 884.25 GC$
Items
|
Posted: Mon Nov 27, 2006 12:45 pm Post subject: 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? _________________ Web Development Community
http://www.webdotdev.com
Low cost Hosting
http://www.web-network-solution.com |
|
| Back to top |
|
|
angel2017 Genius Member


Joined: 11 Sep 2006 Location: Heaven 1972.40 GC$
Items
|
Posted: Thu Nov 30, 2006 3:15 am Post subject: |
|
|
|
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 |
|
|
Sponsored Links
|
Posted: 9 Jul 2008 3:45 am Post subject: Advertisements |
|
|
|
|
|
|
| Back to top |
|
|
|
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
|
|
|
|
|