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
+3-139Lines changed: 3 additions & 139 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,144 +5,8 @@ This Haskell package allows user to query an IP address if it was being used as
5
5
* Free IP2Proxy BIN Data: https://lite.ip2location.com
6
6
* Commercial IP2Proxy BIN Data: https://www.ip2location.com/database/ip2proxy
7
7
8
-
As an alternative, this package can also call the IP2Proxy Web Service. This requires an API key. If you don't have an existing API key, you can subscribe for one at the below:
9
8
10
-
https://www.ip2location.com/web-service/ip2proxy
9
+
Developer Documentation
10
+
=====================
11
11
12
-
## Installation
13
-
14
-
```bash
15
-
cabal install IP2Proxy
16
-
```
17
-
18
-
## QUERY USING THE BIN FILE
19
-
20
-
## Methods
21
-
Below are the methods supported in this package.
22
-
23
-
|Method Name|Description|
24
-
|---|---|
25
-
|open|Open the IP2Proxy BIN data for lookup.|
26
-
|getPackageVersion|Get the package version (1 to 11 for PX1 to PX11 respectively).|
27
-
|getModuleVersion|Get the module version.|
28
-
|getDatabaseVersion|Get the database version.|
29
-
|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 or search engine robot</li></ul>|
30
-
|getAll|Return the proxy information in a record.|
31
-
|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.|
32
-
|getCountryShort|Return the ISO3166-1 country code (2-digits) of the proxy.|
33
-
|getCountryLong|Return the ISO3166-1 country name of the proxy.|
34
-
|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.|
35
-
|getCity|Return the city name of the proxy.|
36
-
|getISP|Return the ISP name of the proxy.|
37
-
|getDomain|Return the domain name of the proxy.|
38
-
|getUsageType|Return the usage type classification of the proxy. 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 usage types supported.|
39
-
|getASN|Return the autonomous system number of the proxy.|
40
-
|getAS|Return the autonomous system name of the proxy.|
41
-
|getLastSeen|Return the number of days that the proxy was last seen.|
42
-
|getThreat|Return the threat type of the proxy.|
43
-
|getProvider|Return the provider of the proxy.|
44
-
45
-
## Usage
46
-
47
-
```haskell
48
-
importIP2Proxy
49
-
50
-
main::IO()
51
-
main =do
52
-
let myfile ="./IP2PROXY-IP-PROXYTYPE-COUNTRY-REGION-CITY-ISP-DOMAIN-USAGETYPE-ASN-LASTSEEN-THREAT-RESIDENTIAL-PROVIDER.BIN"
## QUERY USING THE IP2PROXY PROXY DETECTION WEB SERVICE
107
-
108
-
## Methods
109
-
Below are the methods supported in this package.
110
-
111
-
|Method Name|Description|
112
-
|---|---|
113
-
|openWS| Expects 3 input parameters:<ol><li>IP2Proxy API Key.</li><li>Package (PX1 - PX11)</li></li><li>Use HTTPS or HTTP</li></ol> |
114
-
|lookUp|Query IP address. This method returns a WSResult record containing the proxy info. <ul><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><li>provider</li><ul>|
115
-
|getCredit|This method returns the web service credit balance in a WSResult record.|
To learn more about installation, usage, and code examples, please visit the developer documentation at [https://ip2location-haskell.readthedocs.io/en/latest/](https://ip2location-haskell.readthedocs.io/en/latest/).
0 commit comments