Making Requests
Learn Dedicated ISP Proxies authentication methods including username/password and IP whitelisting. Configure ports and credentials for seamless proxy requests.
Proxy Port
Usage
Code examples
curl -x 1.2.3.4:60000 -U user1:pass1 http://ip.oxylabs.io/location<?php
$username = 'user1';
$password = 'pass1';
$proxy = '1.2.3.4:60000';
$query = curl_init('https://ip.oxylabs.io/location');
curl_setopt($query, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($query, CURLOPT_PROXY, "http://$proxy");
curl_setopt($query, CURLOPT_PROXYUSERPWD, "$username:$password");
$output = curl_exec($query);
curl_close($query);
if ($output)
echo $output;
?>import requests
response = requests.get(
'https://ip.oxylabs.io/location',
proxies={'http': 'http://username:[email protected]:60000',
'https': 'http://username:[email protected]:60000'}
)
print(response.text)curl -x 1.2.3.4:65432 https://ip.oxylabs.io/location <?php
$proxy = '1.2.3.4:65432';
$query = curl_init('https://ip.oxylabs.io/location');
curl_setopt($query, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($query, CURLOPT_PROXY, "http://$proxy");
$output = curl_exec($query);
curl_close($query);
if ($output)
echo $output;
?>import requests
response = requests.get(
'https://ip.oxylabs.io/location',
proxies={'http': 'http://1.2.3.4:65432',
'https': 'http://1.2.3.4:65432'}
)
print(response.text)using System;
using System.Net;
class Example
{
static void Main()
{
var proxy = new WebProxy
{
Address = new Uri($"http://1.2.3.4:65432"),
BypassProxyOnLocal = false,
UseDefaultCredentials = false,
};
var handler = new HttpClientHandler
{
Proxy = proxy,
};
HttpClient client = new HttpClient(handler);
var task = Task.Run(async () =>
{
var response = await client.GetAsync("https://ip.oxylabs.io/location");
var content = response.Content;
var result = await content.ReadAsStringAsync();
return result;
});
task.Wait();
Console.WriteLine(task.Result);
}
}Last updated
Was this helpful?

