|
||||||||||
|
|||||||
| GoogleCommunity Sponsor |
Use coupon "forum" for 50% Off! |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
Sponsored Links
|
|
|
|
#2 (permalink) |
|
Senior Googler
![]() Join Date: Sep 2006
Location: Heaven
Posts: 157
Thanks: 0
Thanked 0 Times in 0 Posts
![]() |
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 |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
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 |