From 568f58cdd1ae275c5e2a87640a621e385aec5314 Mon Sep 17 00:00:00 2001 From: IP2Location Date: Wed, 29 Sep 2021 12:45:15 +0800 Subject: [PATCH] Updated README.md to use PX11 as example. --- README.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index dee2d27..c7d8fbc 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Below are the methods supported in this class. |**string** getDatabaseVersion()|Return the database's compilation date as a string of the form 'YYYY-MM-DD',| |**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.| |**string** getModuleVersion()|Return the version of module.| -|**array** lookup($ip)|Return the IP information in array. Below is the information returned: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.| +|**array** lookup($ip)|Return the IP information in array. Below is the information returned: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.| @@ -29,7 +29,7 @@ Below are the methods supported in this class. | Method Name | Description | | ----------- | ------------------------------------------------------------ | | Constructor | Expect 3 input parameters:
  1. IP2Proxy API Key.
  2. Package (PX1 - PX10)
  3. Use HTTPS or HTTP
| -| lookup | Return the proxy information in array. | +| lookup | Return the proxy information in array. | | getCredit | Return remaining credit of the web service account. | @@ -47,7 +47,7 @@ Open and read IP2Proxy binary database. There are 3 modes: ```php require 'vendor/autoload.php'; -$db = new \IP2Proxy\Database('vendor/ip2location/ip2proxy-php/data/PX10.SAMPLE.BIN', \IP2PROXY\Database::FILE_IO); +$db = new \IP2Proxy\Database('vendor/ip2location/ip2proxy-php/data/PX11.SAMPLE.BIN', \IP2PROXY\Database::FILE_IO); ``` To start lookup result from database, use the following codes: @@ -80,6 +80,13 @@ echo '

Proxy Type: ' . $records['proxyType'] . '

'; */ echo '

Is Proxy: ' . $records['isProxy'] . '

'; echo '

ISP: ' . $records['isp'] . '

'; +echo '

Domain: ' . $records['domain'] . '

'; +echo '

Usage Type: ' . $records['usageType'] . '

'; +echo '

ASN: ' . $records['asn'] . '

'; +echo '

AS: ' . $records['as'] . '

'; +echo '

Last Seen: ' . $records['lastSeen'] . '

'; +echo '

Threat: ' . $records['threat'] . '

'; +echo '

Provider: ' . $records['provider'] . '

'; ``` @@ -111,6 +118,7 @@ if ($results !== false) { echo '

Last Seen: ' . $results['lastSeen'] . ' Day(s)

'; echo '

Proxy Type: ' . $results['proxyType'] . '

'; echo '

Threat: ' . $results['threat'] . '

'; + echo '

Provider: ' . $results['provider'] . '

'; echo '

Is Proxy: ' . $results['isProxy'] . '

'; } ```