Basic query
The basic query only needs to pass username and password. No other parameters are required. In this type of query, the request is set to originate from a random IP address (proxy). Each new request will use a different proxy.
Code example
In the following example, a query to ipinfo.io is executed from a random IP:
curl -x proxy.abcproxy.com:4950 -U "USERNAME:PASSWORD" ipinfo.ioimport urllib.request
import random
username = 'USERNAME'
password = 'PASSWORD'
entry = ('http://%s:%s@proxy.abcproxy.com:4950' %
(username, password))
query = urllib.request.ProxyHandler({
'http': entry,
'https': entry,
})
execute = urllib.request.build_opener(query)
print(execute.open('https://ipinfo.io').read())<?php
$username = 'USERNAME';
$password = 'PASSWORD';
$proxy = 'proxy.abcproxy.com:4950';
$query = curl_init('https://ipinfo.io');
curl_setopt($query, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($query, CURLOPT_PROXY, "http://$proxy");
curl_setopt($query, CURLOPT_PROXYUSERPWD, "$username:$password");
$output = curl_exec($query);
curl_close($query);
if ($output)
echo $output;
?>If you need any help, please feel free to contact customer service at [email protected].
Last updated