[Tutorial] GeoIP and handling rangebans with MySQL
#17

Quote:
Originally Posted by Vince
Посмотреть сообщение
It won't work if you are connecting locally to your own server, because your IP will be a private IP (127.0.0.1 or 192.168.x.x most likely), which is not included in the database. If you so wish, you can add those manually, using any of the user-assigned country codes.

PHP код:
INSERT INTO list_countries (country_codecountry_nameVALUES ('XP''Private Network'); 
PHP код:
INSERT INTO list_ipv4 (range_startrange_endcountry_codeVALUES
(INET_ATON('127.0.0.0'), INET_ATON('127.255.255.255'), 'XP'),
(
INET_ATON('10.0.0.0'), INET_ATON('10.255.255.255'), 'XP'),
(
INET_ATON('172.16.0.0'), INET_ATON('172.31.255.255'), 'XP'),
(
INET_ATON('192.168.0.0'), INET_ATON('192.168.255.255'), 'XP'); 
I've added the banned field and set A1 banned to 1, can you alter the query to check for this? I know regular queries, but this is weird as they're joined or some how.
Reply


Messages In This Thread
GeoIP and handling rangebans with MySQL - by Vince - 18.08.2015, 13:29
Re: GeoIP and handling rangebans with MySQL - by Abagail - 18.08.2015, 14:52
Re: GeoIP and handling rangebans with MySQL - by Crystallize - 18.08.2015, 15:17
Re: GeoIP and handling rangebans with MySQL - by ThePhenix - 19.08.2015, 04:31
Re: GeoIP and handling rangebans with MySQL - by JeaSon - 19.08.2015, 09:59
Re: GeoIP and handling rangebans with MySQL - by Glossy42O - 19.08.2015, 10:04
Re: GeoIP and handling rangebans with MySQL - by JeaSon - 20.08.2015, 11:29
Re: GeoIP and handling rangebans with MySQL - by Kar - 21.08.2015, 00:14
Re: GeoIP and handling rangebans with MySQL - by Vince - 21.08.2015, 07:04
Re: GeoIP and handling rangebans with MySQL - by Kyle - 21.08.2015, 19:56
Re: GeoIP and handling rangebans with MySQL - by PaulDinam - 22.08.2015, 02:40
Re: GeoIP and handling rangebans with MySQL - by Pottus - 22.08.2015, 02:59
Re: GeoIP and handling rangebans with MySQL - by Kyle - 22.08.2015, 15:06
Re: GeoIP and handling rangebans with MySQL - by Abagail - 23.08.2015, 02:50
Re: GeoIP and handling rangebans with MySQL - by JeaSon - 23.08.2015, 07:08
Re: GeoIP and handling rangebans with MySQL - by Vince - 23.08.2015, 09:49
Re: GeoIP and handling rangebans with MySQL - by Kyle - 23.08.2015, 10:05
Re: GeoIP and handling rangebans with MySQL - by JeaSon - 23.08.2015, 11:10
Re: GeoIP and handling rangebans with MySQL - by Yousha - 15.01.2016, 22:17
Re: GeoIP and handling rangebans with MySQL - by Vince - 15.01.2016, 22:47
Re: GeoIP and handling rangebans with MySQL - by raddetine - 13.04.2016, 15:34
Re: GeoIP and handling rangebans with MySQL - by ScIrUsna - 13.04.2016, 17:00
Re: GeoIP and handling rangebans with MySQL - by DetoNater - 21.11.2016, 07:18
Re: GeoIP and handling rangebans with MySQL - by Konstantinos - 21.11.2016, 10:53
Re: GeoIP and handling rangebans with MySQL - by DetoNater - 14.12.2016, 11:56
Re: GeoIP and handling rangebans with MySQL - by Konstantinos - 14.12.2016, 13:33
Re: GeoIP and handling rangebans with MySQL - by DetoNater - 14.12.2016, 14:03
Re: GeoIP and handling rangebans with MySQL - by Konstantinos - 14.12.2016, 14:10
Re: GeoIP and handling rangebans with MySQL - by DetoNater - 14.12.2016, 14:47
Re: GeoIP and handling rangebans with MySQL - by X337 - 14.12.2016, 14:53
Re: GeoIP and handling rangebans with MySQL - by Evocator - 10.09.2017, 08:52
Re: GeoIP and handling rangebans with MySQL - by Vince - 10.09.2017, 09:34
Re: GeoIP and handling rangebans with MySQL - by eSPeZet - 13.02.2018, 21:09

Forum Jump:


Users browsing this thread: 1 Guest(s)