This repository was archived by the owner on Apr 23, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Using.RU
Ivan Dudarev edited this page Oct 9, 2017
·
3 revisions
Документация / Использование
Язык: EN RU
$iptool = new \Ddrv\Iptool\Iptool('/path/to/iptool.database');
print_r($iptool->about());
Array
(
[created] => 1507199627
[author] => Ivan Dudarev
[license] => MIT
[networks] => Array
(
[count] => 276148
[data] => Array
(
[country] => Array
(
[0] => code
[1] => name
)
)
)
)
print_r($iptool->find('81.32.17.89'));
Array
(
[network] => Array
(
[0] => 81.32.0.0
[1] => 81.48.0.0
)
[data] => Array
(
[country] => Array
(
[code] => es
[name] => Spain
)
)
)
print_r($iptool->getRegister('country'));
Array
(
[1] => Array
(
[code] => cn
[name] => China
)
[2] => Array
(
[code] => es
[name] => Spain
)
...
[N] => Array
(
[code] => jp
[name] => Japan
)
)
print_r($iptool->getRegister('country',2));
Array
(
[code] => cn
[name] => China
)
)