| | |
Blocking an IP adress to a certain page
Please support our ASP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
This is a small function that will block the specific IP from viewing the certain page, and it will redirect the user to the main page or noaccess page.
<% ''''''''''''''''''''''''''''''' ' Block the IP addresses that do the SPAM ''''''''''''''''''''''''''''''' Function IsBlockedIP() Dim UserIP Dim BlockedIParray(2) 'assign our blocked IP addresses to our array BlockedIParray(0) = "60.0.201.209" BlockedIParray(1) = "218.11.15.212" 'retrieve the visitors IP address UserIP = Request.ServerVariables("REMOTE_ADDR") 'loop through the Blocked IPs For i = 0 to UBound(BlockedIParray) If UserIP = BlockedIParray(i) Then Response.Redirect "index.asp" 'Response.Redirect "noaccess.asp" End If Next End Function %>
0
•
•
•
•
I think I finished work this code. I want to restrict a page where someone comes from abroad to show another page and when the national network to the actual page opens.
This code which should be put in the php file?
I'm not familiar so much for help.
Thank you
This code which should be put in the php file?
I'm not familiar so much for help.
Thank you
Similar Threads
- IP blocking or MAC address blocking (Java)
- Blocking A Web Page (Windows NT / 2000 / XP)
- Ip Adress (Windows NT / 2000 / XP)
- Change of IP adress... (Geeks' Lounge)
- Blocking vs. Non-Blocking Direct Communication (Java)
| Thread Tools | Search this Thread |
Tag cloud for ASP
archive asp asp.net aspandmssqlserver2005 aspandmssqlserver2005connection aspconnection calendar changeable connection current database databaseconnection diagnostics dreamweaver excel fso html iis microsoft msmsql mssql2005 mssqlserver2005 mssqlserver2005andasp mssqlserverandasp opentextfile query record searchbox selectoption server single specfic sqlserver sqlserverconnection toolkit update web webserver windows7



