05 agosto 2003 alle 18:08:12 Modificato il 05 agosto 2003 alle 18:10:17Non volete che qualcuno che non si è comportato bene entri ancora nel vostro sito ? Bloccategli l'IP !!!
06 agosto 2003 alle 10:08:12 OK ! Visto che questo simil MOD è piaciuto a più d'uno, ecco le modifiche da effettuare. Per prima cosa create un file di nome blockIP-inc.asp con il seguente codice:
<% 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(0)
'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 = 0
'IP numbers to block (please note 0 = one , 1 = two - same as a Array!) 'Ip_array(0) = "xxx.xxx.xxx.xxx"
'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.asp"
End If next %>
e lo inserite nella directory /includes. Poi create un file di nome banned.asp, tipo quello che potete vedere cliccando sul link del post iniziale di questo thread, e lo inserite nella root. Per ultimo, visto che tutte le pagine vengono visualizzate tramite toppage-inc.asp prendete questo file e gli inserite come primissima istruzione questa
<!-- #include file="blockIP-inc.asp" -->
Ed il gioco è fatto ! Ora se volete BANNARE qualcuno basterà inserire il suo indirizzo IP in
'Ip_array(0) = "xxx.xxx.xxx.xxx"
togliere l'apice iniziale ed è fatta ! Ogni nuova aggiunta la potete fare inserendo altri
Naturalmente ad ogni nuovo inserimento dovrete anche modificare in blockIP-inc.asp il valore di Dim Ip_array(0) e di NumberOf = 0. Ad esempio per tre indirizzi inseriti avrete:
<% 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(2)
'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 = 2
'IP numbers to block (please note 0 = one , 1 = two - same as a Array!) Ip_array(0) = "xxx.xxx.xxx.xxx" Ip_array(1) = "yyy.yyy.yyy.yyy" Ip_array(2) = "zzz.zzz.zzz.zzz"
'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.asp"
End If next %>
Bene questo è tutto ! Spero di esservi stato utile...
Saluti.
leon84 Eliminato
0 Discussione
06 agosto 2003 alle 16:53:59 Ma siccome la maggior parte degli utenti possiede un indirizzo IP dinamico capiterà che non entrerà la prima volta ma la seconda volta si ...
Ancor di più , se l'IP dell'utente indesiderato viene assegnato ad un altro utente collegato allo stesso provider , poverino , questo si troverà in faccia un banned e non saprà spiegarsi ...
littlehawk Eliminato
0 Discussione
07 agosto 2003 alle 09:48:07 Modificato il 07 agosto 2003 alle 09:48:33Anche questo è vero... Beh, allora utilizzate questo simil MOD per fare qualche scherzetto a qualche amico
leon84 Eliminato
0 Discussione
07 agosto 2003 alle 12:41:09 l'idea è veramente bella comunque ....
Beh al limite ci faremo veramente qualche scherzetto ...
romolo Avanzato
125 Discussioni
11 settembre 2003 alle 12:37:41 cavolo a me non funge come mai?? chi mi aiuta?? sembra che ho fatto tutto bene pero' nisbaaaa --------------- http://www.romolopomaretti.it
incontrami in questo spazio senza margine nel fondo del display che fa da argine a cento secoli volati via come vertigine qualcuno schiacciò play e fu l'origine chissà se il cosmo chiuso dentro le tre doppie vu è verosimile o è un facsimile quando sembra di viaggiare e invece resti immobile tra i totem e i tabù dell'impossibile ma io che mi muovo qui io oltre frontiera io solo in zona straniera sono io fermo alla tastiera ogni sera schermo di vita vera o chimera di essere laggiù là dove non mi trovo e non so più come trovare dove adesso vivi tu che forse sei in ascolto
Log in
Cerca
Sostieni AspNuke
Un piccolo gesto per aiutarci a mantenere AspNuke.it online
Promo
MusicWebItalia.it Video Testi Traduzioni Spot Colonne sonore Accordi e Spartiti gratis.
Visitatori
Visitatori Correnti : 190 Membri : 0
Anna
Iscritti
Utenti: 18940
Ultimo iscritto : glauco Lista iscritti Messaggi privati: 3373Commenti: 2210Immagini: 39Downloads: 144Articoli: 49Pagine: 101Siti web: 558Notizie: 180Sondaggi: 11Preferiti: 5685330Post sui forum: 51195Libro degli ospiti: 4Eventi: 7