This repository was archived by the owner on Apr 23, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 6 files changed +4
-273
lines changed
Expand file tree Collapse file tree 6 files changed +4
-273
lines changed Original file line number Diff line number Diff line change 11# IP Tool
2- Define data by IP Address
2+ ![ Logo] ( https://github.com/ddrv/iptool/wiki/img/iptool.png )
3+ > IP Tool. Define data by IP Address
34
4- # Install
5- Add to ` composer.json ` :
6- ``` json
7- {
8- "require" : {
9- "ddrv/iptool" :" *"
10- }
11- }
12- ```
13- And run
14- ``` text
15- php composer.phar install
16- ```
17-
18- # Create your IP addresses database
19- See examples for create database:
20- * Geo from Maxmind GeoLite2 Country ` examples/geoFromMaxmindCountry.php `
21- * Geo from Maxmind GeoLite2 City ` examples/geoFromMaxmindCity.php `
22-
23- # Use
24- ``` php
25- /**
26- * Initialization IP Tool
27- */
28- $iptool = new \Ddrv\Iptool\Iptool('/path/to/iptool.database');
29- ```
30-
31- ``` php
32- /**
33- * Get information about created database
34- */
35- print_r($iptool->about());
36- ```
37- ``` text
38- Array
39- (
40- [created] => 1507199627
41- [author] => Ivan Dudarev
42- [license] => MIT
43- [networks] => Array
44- (
45- [count] => 276148
46- [data] => Array
47- (
48- [country] => Array
49- (
50- [0] => code
51- [1] => name
52- )
53-
54- )
55-
56- )
57-
58- )
59- ```
60- ``` php
61- /**
62- * Search IP Address data
63- */
64- print_r($iptool->find('81.32.17.89'));
65- ```
66- ``` text
67- Array
68- (
69- [network] => Array
70- (
71- [0] => 81.32.0.0
72- [1] => 81.48.0.0
73- )
74-
75- [data] => Array
76- (
77- [country] => Array
78- (
79- [code] => es
80- [name] => Spain
81- )
82-
83- )
84-
85- )
86- ```
5+ [ Documentation] ( https://github.com/ddrv/iptool/wiki )
Original file line number Diff line number Diff line change 11{
22 "name" : " ddrv/iptool" ,
3- "version" :" 1.0.1 " ,
3+ "version" :" 1.0.2 " ,
44 "require" :{
55 "php" :" >=5.3.0" ,
66 "ext-pdo" : " *" ,
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments