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
+73-1Lines changed: 73 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,11 +5,17 @@ This library allows user to query an IP address if it was being used as VPN anon
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 library 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
+
10
+
https://www.ip2location.com/web-service/ip2proxy
11
+
8
12
## Requirements ##
9
13
Intellij IDEA: https://www.jetbrains.com/idea/
10
14
15
+
## QUERY USING THE BIN FILE
16
+
11
17
## Methods
12
-
Below are the methods supported in this class.
18
+
Below are the methods supported in this library.
13
19
14
20
|Method Name|Description|
15
21
|---|---|
@@ -124,3 +130,69 @@ object IP2ProxyTest {
124
130
}
125
131
```
126
132
133
+
## QUERY USING THE IP2PROXY PROXY DETECTION WEB SERVICE
134
+
135
+
## Methods
136
+
Below are the methods supported in this library.
137
+
138
+
|Method Name|Description|
139
+
|---|---|
140
+
|Open| Expects 3 input parameters:<ol><li>IP2Proxy API Key.</li><li>Package (PX1 - PX11)</li></li><li>Use HTTPS or HTTP</li></ol> |
141
+
|IPQuery|Query IP address. This method returns a JsonObject 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>|
142
+
|GetCredit|This method returns the web service credit balance in a JsonObject.|
143
+
144
+
## Usage
145
+
146
+
```scala
147
+
objectIP2ProxyTest {
148
+
defmain(args: Array[String]):Unit= {
149
+
try {
150
+
valws=newIP2ProxyWebService
151
+
valstrIPAddress="8.8.8.8"
152
+
valstrAPIKey="YOUR_API_KEY"
153
+
valstrPackage="PX11"
154
+
valboolSSL=true
155
+
ws.Open(strAPIKey, strPackage, boolSSL)
156
+
varmyResult= ws.IPQuery(strIPAddress)
157
+
if (myResult.get("response") !=null&& myResult.get("response").getAsString =="OK") {
0 commit comments