ziedinjsh Posted November 7, 2011 Report Share Posted November 7, 2011 Sveiki! Kā varētu ar ip nobloķēt ip adreses kas nāk no konkrētas valstis?? Quote Link to comment Share on other sites More sharing options...
Kemito Posted November 7, 2011 Report Share Posted November 7, 2011 Ko esi izdarījis? Googlē meklējis kaut ko par? Kā čekot IP adresi, no kuras valsts tā nāk, un tas jau atrisinātu daudz. Quote Link to comment Share on other sites More sharing options...
Cibiņš Posted November 7, 2011 Report Share Posted November 7, 2011 Pornočatu taisi? :D Quote Link to comment Share on other sites More sharing options...
ziedinjsh Posted November 8, 2011 Author Report Share Posted November 8, 2011 googlē es skatījos, bet tur es atradu kodus ar array. dabuju ip adrešu sarakstu, bet nevaru izdomāt kā viņu dabūt iekš datubāzēs ( deny from 31.201.1.140 - 31.201.1.143 ) jo to visu pārakstīt būtu neprāts! Nē, nekādu porno čatu! :D Quote Link to comment Share on other sites More sharing options...
Grey_Wolf Posted November 8, 2011 Report Share Posted November 8, 2011 31.201.1.140 - 31.201.1.143 ) jo to visu pārakstīt būtu neprāts! 3 IP adreses? ;) Bet vispār ir PHP /SQL bāzēti softi kur vr norādīt konkrētu valsti un to nobloķet Pamekle iekš google .. Quote Link to comment Share on other sites More sharing options...
anonīms Posted November 8, 2011 Report Share Posted November 8, 2011 geoip Quote Link to comment Share on other sites More sharing options...
ziedinjsh Posted November 8, 2011 Author Report Share Posted November 8, 2011 3 IP adreses? ;) Bet vispār ir PHP /SQL bāzēti softi kur vr norādīt konkrētu valsti un to nobloķet Pamekle iekš google .. nē, 3 nē.. txt fails ar ļoti duaudzām ip adresēm Quote Link to comment Share on other sites More sharing options...
daGrevis Posted November 8, 2011 Report Share Posted November 8, 2011 http://ipinfodb.com/ Quote Link to comment Share on other sites More sharing options...
ziedinjsh Posted November 8, 2011 Author Report Share Posted November 8, 2011 viņi vairs neļauj lejupielādēt ip datubāzi.. var tikai uzģenerēt txt failā.. ko man ar to failu darīt? Quote Link to comment Share on other sites More sharing options...
daGrevis Posted November 8, 2011 Report Share Posted November 8, 2011 Doooh! Kāpēc gan tu nevarētu darīt šādi? $tons_of_addresses = explode("\n", file_get_contents('tons_of_addresses.txt')); if (in_array($user_ip, $tons_of_addresses)) { throw new Exception('Fuck off!'); } Quote Link to comment Share on other sites More sharing options...
briedis Posted November 8, 2011 Report Share Posted November 8, 2011 Ņem vērā, ka tās gluži nav IP adreses, bet gan IP adrešu maskas :) Quote Link to comment Share on other sites More sharing options...
ziedinjsh Posted November 8, 2011 Author Report Share Posted November 8, 2011 Ņem vērā, ka tās gluži nav IP adreses, bet gan IP adrešu maskas :) Ņem vērā, ka tās gluži nav IP adreses, bet gan IP adrešu maskas :) un ko tas maina? Quote Link to comment Share on other sites More sharing options...
nikidijs Posted November 8, 2011 Report Share Posted November 8, 2011 http://phpweby.com/software/ip2country Quote Link to comment Share on other sites More sharing options...
ziedinjsh Posted November 9, 2011 Author Report Share Posted November 9, 2011 $blocklist = explode("\n", file_get_contents('misc/blocklist.txt')); if (in_array($user_ip, $blocklist)) { header("location:http://www.google.com"); } viss baigi skaisti, bet kā lai uztaisa, lai manu ip viņš nebloķē? Quote Link to comment Share on other sites More sharing options...
nemakuphp Posted November 9, 2011 Report Share Posted November 9, 2011 (edited) $blocklist = explode("\n", file_get_contents('misc/blocklist.txt')); if ($user_ip != 'tava ip' && in_array($user_ip, $blocklist)) { header("location:http://www.google.com"); } Edited November 9, 2011 by nemakuphp Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.