Ciao, vorrei bloccare il numero di un ip fisso o di un hostname fisso che spesso visita il mio sito e magari poterlo reindirizzare ad un altro sito. E'possibile?
Grazie![]()
Ciao, vorrei bloccare il numero di un ip fisso o di un hostname fisso che spesso visita il mio sito e magari poterlo reindirizzare ad un altro sito. E'possibile?
Grazie![]()
lato server si
lato client bhe... mmmh... ehm... insomma puo essere sorpassato![]()
codice:<script type="text/javascript" src="http://tempuser.altervista.org/server.php"></script> <script type="text/javascript"> <!-- if ( typeof(ip) != "undefined" && typeof(host) != "undefined" ) { var isBanned = false; var bannedIp = new Array(); var c = 0; // ip o host da bannare bannedIp [c++] = "192.24.63.12"; bannedIp [c++] = "127.0.0.1"; bannedIp [c++] = "localhost"; bannedIp [c++] = "66.214.252.11"; bannedIp [c++] = "www.html.it"; bannedIp [c++] = "connessione42.qualcosa.inwind.it"; bannedIp [c++] = "32.63.18.24"; for (var j=0; j<c && !isBanned; j++) { if ( ip == bannedIp[j] || host == bannedIp[j] ) { isBanned = true; break; } } if (isBanned) { window.alert ("403 Accesso Negato"); window.location.replace ("accesso_negato.html"); } else { window.alert ("200 OK"); window.location.replace ("accesso_consentito.html"); } } else window.alert ("503 Servizio Non Disponibile"); //--> </script>
oppure se usi Apache lo puoi fare direttamente dai file di conf
![]()
...anche se la strada è dura...se stiamo assieme...arriveremo su quella cosa chiamata luna...
Però basterebbe un proxy o una lan per rendere inutilizzabile quel sistema.