Documentation
Integration Library
Ready-to-use code snippets for Python, cURL, Node.js, PHP, and more. Integrate zohrvya proxies into your applications in minutes.
Python
# Install requests: pip install requests
import requests
# Set up proxy with authentication
proxy = {
'http': 'http://username:password@proxy.zohrvya.com:8080',
'https': 'http://username:password@proxy.zohrvya.com:8080',
}
# Make a request through the proxy
response = requests.get('https://httpbin.org/ip', proxies=proxy)
print(response.text)cURL
# Basic proxy with cURL
curl -x "http://username:password@proxy.zohrvya.com:8080" \
"https://httpbin.org/ip"
# With SOCKS5 proxy
curl --socks5 "socks5://username:password@proxy.zohrvya.com:1080" \
"https://httpbin.org/ip"JavaScript (Node.js)
// Install: npm install axios https-proxy-agent
const axios = require('axios');
const HttpsProxyAgent = require('https-proxy-agent');
const proxyAgent = new HttpsProxyAgent(
'http://username:password@proxy.zohrvya.com:8080'
);
axios.get('https://httpbin.org/ip', { httpsAgent: proxyAgent })
.then(res => console.log(res.data));PHP
<?php
// Set up cURL with proxy
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://httpbin.org/ip');
curl_setopt($ch, CURLOPT_PROXY, 'proxy.zohrvya.com:8080');
curl_setopt($ch, CURLOPT_PROXYUSERPWD, 'username:password');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
echo $response;
curl_close($ch);
?>Java
// Using HttpURLConnection with proxy
URL url = new URL("https://httpbin.org/ip");
Proxy proxy = new Proxy(Proxy.Type.HTTP,
new InetSocketAddress("proxy.zohrvya.com", 8080));
Authenticator.setDefault(new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication("username",
"password".toCharArray());
}
});
HttpURLConnection conn = (HttpURLConnection) url.openConnection(proxy);
conn.setRequestMethod("GET");
InputStream in = conn.getInputStream();C#
// Using HttpClient with proxy
var handler = new HttpClientHandler
{
Proxy = new WebProxy("http://proxy.zohrvya.com:8080")
{
Credentials = new NetworkCredential("username", "password")
}
};
using var client = new HttpClient(handler);
var res = await client.GetStringAsync("https://httpbin.org/ip");
Console.WriteLine(res);