Forum Moderators: phranque
In other words, everyone sees one page, while users with a certain IP range see another HTML page. Ideally, I wouldn't have a seperate HTML page, just a part inside the HTML which acts like an "If Then Else" statement. So, what's the simplest way of going about this? PHP? Javascript? Perhaps even HTML?
[edited by: dwhite at 5:35 pm (utc) on July 11, 2004]
response.redirect("http://www.xyz.com")
response.end
end if
save this in a .inc or .asp, then server side include it on your header page or every single page.
You can also have a list of banned IPs in an array and run through it in a loop. That works also.
You can also put all IP ranges in a DB. Then you can use a query to filter the incoming IP.
I thought most third party boards come with IP blocking ability. What is yours?
you can easily modify the script to match just a part of the IP. Any scripting language can do it. The above is just the basic idea of how to block them and channel them away from your site.
I'd be grateful if you could put some code together and post in this thread. Would it take long?
You can also put all IP ranges in a DB. Then you can use a query to filter the incoming IP.
Sounds a good idea, but I only need to use the banning code for a few pages on my site, so, code actually on the HTML page would be ideal.
I thought most third party boards come with IP blocking ability. What is yours?
Good luck on locking the idiot out.
Matt