# 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.

{% tabs %}
{% tab title="cURL" %}

```shell
curl --proxy "http://USERNAME:PASSWORD@proxy.suborbit.al:1337" https://ipinfo.io
```

{% endtab %}

{% tab title="PHP" %}

```php
<?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;
}
?>
```

{% endtab %}

{% tab title="C#" %}

```csharp
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"));
        }
    }
}
```

{% endtab %}

{% tab title="NodeJS" %}

```javascript
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);
});
```

{% endtab %}

{% tab title="Python" %}

```python
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)
```

{% endtab %}
{% endtabs %}
