You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+26-45Lines changed: 26 additions & 45 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,27 +14,13 @@ Below are the methods supported in this class.
14
14
15
15
### BIN Database Class
16
16
17
-
|Method Name|Description|
17
+
| Function Name|Description|
18
18
|---|---|
19
-
|open|Open the IP2Proxy BIN data for lookup. Please see the **Usage** section of the 3 modes supported to load the BIN data file.|
20
-
|close|Close and clean up the file pointer.|
21
-
|getPackageVersion|Get the package version (1 to 10 for PX1 to PX10 respectively).|
22
-
|getModuleVersion|Get the module version.|
23
-
|getDatabaseVersion|Get the database version.|
24
-
|isProxy|Check whether if an IP address was a proxy. Returned value:<ul><li>-1 : errors</li><li>0 : not a proxy</li><li>1 : a proxy</li><li>2 : a data center IP address</li></ul>|
25
-
|getAll|Return the proxy information in array.|
26
-
|getProxyType|Return the proxy type. Please visit <ahref="https://www.ip2location.com/database/px10-ip-proxytype-country-region-city-isp-domain-usagetype-asn-lastseen-threat-residential"target="_blank">IP2Location</a> for the list of proxy types supported|
27
-
|getCountryShort|Return the ISO3166-1 country code (2-digits) of the proxy.|
28
-
|getCountryLong|Return the ISO3166-1 country name of the proxy.|
29
-
|getRegion|Return the ISO3166-2 region name of the proxy. Please visit <ahref="https://www.ip2location.com/free/iso3166-2"target="_blank">ISO3166-2 Subdivision Code</a> for the information of ISO3166-2 supported|
30
-
|getCity|Return the city name of the proxy.|
31
-
|getISP|Return the ISP name of the proxy.|
32
-
|getDomain|Internet domain name associated with IP address range.|
33
-
|getUsageType|Usage type classification of ISP or company. Refer to usage type reference below.|
34
-
|getASN|Autonomous system number (ASN).|
35
-
|getAS|Autonomous system (AS) name.|
36
-
|getLastSeen|Proxy last seen in days.|
37
-
|getThreat|Security threat reported.|
19
+
|Constructor|Expect 2 input parameters:<ol><li>Full path of IP2Proxy BIN data file.</li><li>File Open Mode<ul><li> SHARED_MEMORY</li><li>MEMORY_CACHE</li><li>FILE_IO</li></ul></li></ol>For SHARED_MEMORY and MEMORY_CACHE, it will require your server to have sufficient memory to hold the BIN data, otherwise it will raise the errors during the object initialization.|
20
+
|**string** getDatabaseVersion()|Return the database's compilation date as a string of the form 'YYYY-MM-DD',|
21
+
|**string** getPackageVersion()|Return the database's type, 1 to 10 respectively for PX1 to PX10. Please visit https://www.ip2location.com/databases/ip2proxy for details.|
22
+
|**string** getModuleVersion()|Return the version of module.|
23
+
|**array** lookup($ip)|Return the IP information in array. Below is the information returned:<ul><li>ipNumber</li><li>ipVersion</li><li>ipAddress</li><li>countryCode</li><li>countryName</li><li>regionName</li><li>cityName</li><li>isp</li><li>domain</li><li>usageType</li><li>asn</li><li>as</li><li>lastSeen</li><li>threat</li><li>proxyType</li><li>isProxy</li></ul>You can visit [IP2Location](https://www.ip2location.com/database/px10-ip-proxytype-country-region-city-isp-domain-usagetype-asn-lastseen-threat-residential) website for the description of each field. Note: although the above names are not exactly matched with the names given in this link, but they are self-described.|
38
24
39
25
40
26
@@ -59,16 +45,15 @@ Open and read IP2Proxy binary database. There are 3 modes:
59
45
3.**\IP2Proxy\Database::SHARED_MEMORY** - Stores whole IP2Proxy database into system memory. Lookup is possible across all applications within the system. Extremely resources consuming. Do not use this mode if your system do not have enough memory.
Note: if you are getting error such as `Call to undefined function IP2Proxy\gmp_import()`, you probably did not have the module to install or enable in php.ini. You can check your php.ini to make sure that the module has been enabled.
85
+
119
86
120
87
### Web Service API
121
88
@@ -124,7 +91,7 @@ To lookup by Web service, you will need to sign up for [IP2Proxy Web Service](ht
124
91
Start your lookup by following codes:
125
92
126
93
```php
127
-
require 'class.IP2Proxy.php';
94
+
require 'vendor/autoload.php';
128
95
129
96
// Lookup by Web API
130
97
$ws = new \IP2Proxy\WebService('YOUR_API_KEY', 'PX10', false);
| VPN | Anonymizing VPN services. These services offer users a publicly accessible VPN for the purpose of hiding their IP address. | High |
127
+
| TOR | Tor Exit Nodes. The Tor Project is an open network used by those who wish to maintain anonymity. | High |
128
+
| DCH | Hosting Provider, Data Center or Content Delivery Network. Since hosting providers and data centers can serve to provide anonymity, the Anonymous IP database flags IP addresses associated with them. | Low |
129
+
| PUB | Public Proxies. These are services which make connection requests on a user's behalf. Proxy server software can be configured by the administrator to listen on some specified port. These differ from VPNs in that the proxies usually have limited functions compare to VPNs. | High |
130
+
| WEB | Web Proxies. These are web services which make web requests on a user's behalf. These differ from VPNs or Public Proxies in that they are simple web-based proxies rather than operating at the IP address and other ports level. | High |
131
+
| SES | Search Engine Robots. These are services which perform crawling or scraping to a website, such as, the search engine spider or bots engine. | Low |
132
+
| RES | Residential proxies. These services offer users proxy connections through residential ISP with or without consents of peers to share their idle resources. Only available with PX10 | Medium |
0 commit comments