hente oplyninger fra en anden fil.
Hvis ejg nu har min index og jeg vil have den skal hente de her oplyninger fra en anden fil som hedder "ban.asp"<%
Dim IP_truth
Dim NumberOf
Dim I
'Creating the Array, with the number of ip's your blocking (please note 0 = one , 1 = two - same as a Array!)
Dim Ip_array(1)
'Find Visters IP
IP_truth = request.servervariables("REMOTE_ADDR")
'At this point we are defining the number of IP addresses we are going to block (please note 0 = one , 1 = two - same as a Array!)
NumberOf = 1
'IP numbers to block (please note 0 = one , 1 = two - same as a Array!)
Ip_array(0) = "212.10.98.40"
Ip_array(0) = "192.168.1.6"
'Here we are looping through the Array and checking the IP address of each, if a banned IP is found , we print out a statement saying that they are banned, and the page stops processing. You could always change the Response.write statement to a redirect to a Central Banned page.
For I = 0 to NumberOf
If Ip_array(I) = IP_truth then
'Page to redirect if there IP is blocked
Response.Redirect "banned.html"
End If
next
%>
Hvad skal jeg skrive i min index.asp ?