Dedicated Proxies Tutorials
How to use HTTP Proxies in PHP Code
Before using our proxies, ensure that your server IP address is authorized via the proxy control panel.
Sample code for using our proxies in PHP Code:
Sample code for using our proxies in PHP Code:
$url = 'http://proxy-spider.com/myip'; $proxy = '1.1.1.1:3129'; // <-- 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 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:
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("1.1.1.1", 3129); // 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 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:
Sample code for using proxies in Python code:
import requests r = requests.get("http://proxy-spider.com/myip", proxies={"http": "http://1.1.1.1:3129"}) print(r.text)
How to use 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:
Sample code for using proxies in Curl:
curl -x '1.1.1.1:3129' -L 'http://proxy-spider.com/myip'
How to use HTTP Proxies in Curl (without server IP address authorization)
Sample code for using proxies in Curl:
Sample code for using proxies in Curl:
curl -x '1.1.1.1:3129' -U 'username:password' -L 'http://proxy-spider.com/myip'