Residential Proxies Tutorials

How to use Residential HTTP Proxies in PHP Code

Preparation:

1. If you want to use secure connections (https), you need to install our SSL certificate or configure software ignore SSL checks (for CURL util flag --insecure).
2. If you want to use proxy without login / password, you need add your IP to auth list.


For next:

Put 'residential.proxy-spider.com:8082' into proxy field (browser / cli / another software) like a standard proxy (or service_login:[email protected]:8082 if you not added your IP to auth list).

Depending on the selected country / rotating option proxy will change every request or will stay same.


Sample code for using our proxies in PHP Code:
$url = 'http://proxy-spider.com/myip';
$proxy = 'residential.proxy-spider.com:8082';  // <-- set your proxy here

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_PROXY, $proxy);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
$response = curl_exec($curl);
curl_close($curl);

echo $response;

How to use Residential HTTP Proxies in Java code
Before using our proxies, ensure that your server IP address is authorized via the proxy control panel.
Sample code for using proxies in Java code:
import java.net.*;
import java.util.Scanner;

class ProxyExample {
  public static void main(String[] args) throws Exception {
    InetSocketAddress address = new InetSocketAddress("residential.proxy-spider.com", 8082); // Set proxy IP/port here.
    Proxy proxy = new Proxy(Proxy.Type.HTTP, address);
    URL url = new URL("http://proxy-spider.com/myip");
    URLConnection connection = url.openConnection(proxy);
    Scanner scanner = new Scanner(connection.getInputStream());
    System.out.println(scanner.next());
    scanner.close();
  }
}

How to use Residential HTTP Proxies in Python code
Before using our proxies, ensure that your server IP address is authorized via the proxy control panel.
Sample code for using proxies in Python code:
import requests

r = requests.get("http://proxy-spider.com/myip",
                 proxies={"http": "http://residential.proxy-spider.com:8082"})
print(r.text)

How to use Residential HTTP Proxies in Curl
Before using our proxies, ensure that your server IP address is authorized via the proxy control panel.
Sample code for using proxies in Curl:
curl -x 'residential.proxy-spider.com:8082' -L 'http://proxy-spider.com/myip'

How to use Residential HTTP Proxies in Curl (without server IP address authorization)

Sample code for using proxies in Curl:
curl -x 'residential.proxy-spider.com:8082' -U 'username:password' -L 'http://proxy-spider.com/myip'

complete at 0.0006 s; cached: 1; cache enable: truek17b5a6b43c19050d9c0c56457cc2a95440d1ae18.html