Code Examples
We have included some code examples below for the most common programming languages below, just be sure to replace USERNAME:PASSWORD with your details.
curl --proxy "http://USERNAME:PASSWORD@proxy.suborbit.al:1337" https://ipinfo.io
<?php
$username = 'USERNAME';
$password = 'PASSWORD';
$proxy = 'proxy.suborbit.al:1337';
$query = curl_init('https://ipinfo.io');
curl_setopt($query, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($query, CURLOPT_PROXY, "http://$proxy");
curl_setopt($query, CURLOPT_PROXYUSERPWD, "$username:$password");
$response = curl_exec($query);
curl_close($query);
if ($response){
echo $response;
}
?>
using System;
using System.Net;
class SuborbitExample
{
static void Main()
{
using (WebClient wc = new WebClient())
{
wc.Proxy = new WebProxy("proxy.suborbit.al:1337");
wc.Proxy.Credentials = new NetworkCredential("USERNAME", "PASSWORD");
Console.WriteLine(wc.DownloadString("https://ipinfo.io"));
}
}
}
const request = require('request');
var reqOpts = {
url: "https://ipinfo.io",
method: "GET",
proxy: "http://USERNAME:PASSWORD@proxy.suborbit.al:1337"
};
request(reqOpts, function(err, response, body){
console.log(body);
});
import requests
proxy = {
'http': 'http://USERNAME:PASSWORD@proxy.suborbit.al:1337',
'https': 'http://USERNAME:PASSWORD@proxy.suborbit.al:1337' # Even for HTTPS requests the proxy is still using the HTTP protocol.
}
response = requests.get('https://ipinfo.io', proxies=proxy)
print(response.content)
Last updated