Country
Want to route your request via a specific country's IP? It's simple with HomeIP. Just add the country flag to your authorization header.
This flag accepts the country's two-letter 3166-1 alpha-2 code, and it's case insensitive. So, whether you type 'DE' or 'de', you'll route through a German proxy.\
Examples:
Germany: Use the code
DEorde.United Kingdom: Opt for
GBorgb.Thailand: Specify with
THorth.
Check out the provided examples to see how you can seamlessly incorporate this in your requests.
To make a request to ip.homeip.io using a random IP address from Germany, you would use the country flag with the country code for Germany (DE):
curl -x pr.homeip.io:7777 -U "username=USERNAME+country=de:PASSWORD" http://ip.homeip.io<?php
$username = 'USERNAME';
$password = 'PASSWORD';
$country = 'DE';
$proxy = 'pr.homeip.io:7777';
$query = curl_init('http://ip.homeip.io');
curl_setopt($query, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($query, CURLOPT_PROXY, "http://$proxy");
curl_setopt($query, CURLOPT_PROXYUSERPWD, "username=$username+country=$country:$password");
$output = curl_exec($query);
curl_close($query);
if ($output)
echo $output;
?>import urllib.request
import random
username = 'USERNAME'
password = 'PASSWORD'
country = 'DE'
entry = ('http://username=%s+country=%s:%s@pr.homeip.io:7777' %
(username, country, password))
query = urllib.request.ProxyHandler({
'http': entry,
'https': entry,
})
execute = urllib.request.build_opener(query)
print(execute.open('http://ip.homeip.io').read())
Last updated