Residential IPs Integration Guide

Here you can find detailed information about GeoSurf™ Residential IPs integration. GeoSurf™ has an inbuilt IP rotation solution designed for easy integration. If you don’t find the right documentation for your needs, please fill in the contact us form and one of our representatives will be in touch.

Browser Configuration

Google Chrome

  1. Click “Customize and Control Google Chrome” menu.
  2. Click “Settings” button’
  3. Scroll down and click on “Show advanced settings…”
  4. Scroll down and click on “Change proxy settings…” found under “Network”
  5. Under “Internet Properties” window click “Lan settings” button.
  6. Under “Local Area Network (LAN) Settings” window click on the Proxy server for your LAN” and enter your proxy settings.
  7.  Click on “Advanced” button.
  8. Type gw1.geosurf.io under HTTP proxy.
  9. Define the required port for the desired country (full list found in GeoSurf residential dashboard).
  10. Check “Use this proxy server for all protocols”.
  11. Click OK and Apply to save the settings.

Mozilla Firefox

  1. Open firefox.
  2. Open settings menu → Click on options.
  3. Click on Advanced tab.
  4. Navigate to “Network”.
  5. Click “settings” found under “Connections”.
  6. Select Manual proxy configuration radio button.
  7.  Type gw1.geosurf.io under HTTP proxy.
  8. Define the required port for the desired country (full list found in GeoSurf residential dashboard).
  9. Check “Use this proxy server for all protocols”.
  10. Click OK.
  11. Go to ipinfo.io and verify the IP you got is from the desired country.

Internet Explorer

  1. Open Internet Explorer.
  2. Click on the Internet Explorer Settings which is in the top-right corner of the browser window.
  3. Click on Internet options.
  4. Under “Internet Properties” window click “Lan settings” button.
  5. Under “Local Area Network (LAN) Settings” window click on the Proxy server for your LAN” and enter your proxy settings.
  6. Click on “Advanced” button.
  7. Type gw1.geosurf.io under HTTP proxy.
  8. Define the required port for the desired country (full list found in GeoSurf residential dashboard).
  9. Check “Use this proxy server for all protocols”.
  10. Click OK and Apply to save the settings.

API & Examples

PHP file_get_contents proxy example

PHP. file_get_contents
// PHP file_get_contents proxy example
// http://www.geosurf.com//resources/residential-ips-integration-guide

// Our gateway’s hosthname + port, check your dashboard for full gateways list
$gs_proxy_addr = “gw1.geosurf.io:8081”;

// Target URL
$url = “http://www.example.com”;

// Create file_get_contents context stream
$proxy_context_array = array(
‘http’ => array(
‘proxy’ => $gs_proxy_addr,
‘request_fulluri’ => TRUE
)
);
$proxy_context = stream_context_create($proxy_context_array);

// Use context stream with file_get_contents
$data = file_get_contents($url, FALSE, $context);

PHP cURL proxy example

PHP. cURL
// PHP cURL proxy example
// http://www.geosurf.com//resources/residential-ips-integration-guide

// Our gateway’s hosthname + port, check your dashboard for full gateways list
$gs_proxy_addr = “gw1.geosurf.io:8081”;

// Target URL
$url = “http://www.example.com”;

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_PROXY, $gs_proxy_addr);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 1);
$curl_scraped_page = curl_exec($ch);
curl_close($ch);

Python version 2.x proxy example

# Python 2 proxy example
# http://www.geosurf.com//resources/residential-ips-integration-guide

import urllib2

// Our gateway’s hosthname + port, check your dashboard for full gateways list
gs_proxy_addr = ‘gw1.geosurf.io:8081’

proxy = urllib2.ProxyHandler({
‘http’: gs_proxy_addr,
‘https’: gs_proxy_addr
})
opener = urllib2.build_opener(proxy)
urllib2.install_opener(opener)

urllib2.urlopen(‘http://www.example.com’)
urllib2.urlopen(‘http://www.example.com’)

Python version 3.x proxy example

Python. version 3.x
# Python 3 proxy example
# http://www.geosurf.com//resources/residential-ips-integration-guide

import urllib.request as req

// Our gateway’s hosthname + port, check your dashboard for full gateways list
gs_proxy_addr = ‘gw1.geosurf.io:8081’

proxy = req.ProxyHandler({
‘http’: gs_proxy_addr,
‘https’: gs_proxy_addr
})
opener = req.build_opener(proxy)
req.install_opener(opener)

req.urlopen(‘http://www.google.com’)
req.urlopen(‘https://www.google.com’)

Ruby proxy example

# Ruby proxy example
# http://www.geosurf.com//resources/residential-ips-integration-guide

require "uri"
require 'net/http'

# Our reverse proxy hostname + port, check your address in Dashboard
gs_proxy_addr = 'gw1.geosurf.io'
gs_proxy_port = '8081'

uri = URI.parse("http://www.example.com")
proxy = Net::HTTP::Proxy(gs_proxy_addr, gs_proxy_port)

req = Net::HTTP::Get.new(uri.path)

result = proxy.start(uri.host,uri.port) do |http|
http.request(req)
end

puts result.body

Java global proxy example

// Java global proxy example
// http://www.geosurf.com//resources/residential-ips-integration-guide

System.setProperty("proxySet", "true");

// Our reverse proxy hostname + port, check your address in Dashboard
System.setProperty("http.proxyHost", "gw1.geosurf.io");
System.setProperty("http.proxyPort", "8081");

URL url = new URL("http://www.example.com/");
URLConnection con = url.openConnection();

Java apache HttpClient proxy example

// Java Apache HttpClient proxy example
// http://www.geosurf.com//resources/residential-ips-integration-guide

String gs_proxy_addr = "gw1.geosurf.io";
int gs_proxy_port = 8081;

DefaultHttpClient httpclient = new DefaultHttpClient();

HttpHost proxy = new HttpHost(gs_proxy_addr, gs_proxy_port , "http");
httpclient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, proxy);
 
HttpGet httpget = new HttpGet("http://www.example.com");
 
HttpResponse response = httpclient.execute(httpget);

Most simple CURL example

Example request a Romanian IP. for Curl -v –proxy gw1.geosurf.io:8181 “http://www.ipinfo.io”.

Log in to your dashboard to get a full list of our gateways and countries. Don’t forget to whitelist your machine IP, see instruction.

3rd party software integration

Using Geosurf Residential IP proxy with GSA search engine ranker

In order to use Geosurf with GSA search engine ranker please follow the steps below:

  • Click on the “options” button
  • Select “Use Proxies” and then click on “Configure” button
  • Click “Add Proxy” and then select “Add Single Proxy”
  • Select “Web proxy” and enter our gateway’s hostname + port
  • Check your dashboard for full gateways list

Using Geosurf Geosurf Residential IP proxy with Foxy Proxy

Please follow the steps below:

  1. Download and install FoxyProxy from the Chrome store.
  2. Open the extension.
  3. Click on “Options”.
  4. Click on “proxies” tab found on the right sidebar.
  5. Within “proxies” menu, click on “Add new proxy”.
  6. Choose “Manual Proxy Configuration”
  7. Enter our gateway’s hostname + port “Host or IP Address” (Example gw1.geosurf.io port:8099 for India) and click save.
  8. Check your dashboard for full gateways list and country ports.
  9. Go to “Proxy mode” and select “Use gw1.. For all URLs” from the drop-down menu.
  10. Check the IP  – http://www.ip2location.com.

Connection problems

Are you behind a firewall?

Some hosting providers & system administrators will block outgoing access to Geosurf Residential ports. Check with your hosting provider or your IT department to find out how to whitelist the required ports. Full list found in GeoSurf residential dashboard .

Are you getting Connection Refused from AWS/EC?

You probably need to explicitly enable outgoing access to GeoSurf residential ports in your EC2 firewall/networking configuration (full list found in GeoSurf residential dashboard).

Are you getting 408 timeouts?

If a significant portion of your requests is timing out ( 408 response code), there are a few reasons this could happen:

  1. The network connection between you and our gateway or between the gateway and the IP is not stable.
    1. Try using another gateway (ex. gw2.geosurf.io) and see if it fixes the issue.
    2. Try switching an IP, simply end the session and make another request through our gateway (IP will rotate automatically)
  2. The request you are making takes a long time to load.
    1. Increase the request timeout using a within the request header.
    2. Switch an IP.
  3. The residential IPs has been blocked by the remote site.
    1. Although this rarely happens, switching an IP will resolve the issue.

If only a small percentage of your requests are getting a 408 response code, the optimal solution is to resend your requests with a short delay of at least 3 seconds in-between each request.

Sign up now
Start your experience with our GeoSurf Premium Proxy!