Integrations / Language

Use Proxys with PHP (cURL)

Use Proxys from PHP with the cURL extension.

Steps

  1. Set CURLOPT_PROXY and CURLOPT_PROXYUSERPWD.
PHP
$ch = curl_init("https://ipinfo.io/json");
curl_setopt($ch, CURLOPT_PROXY, "gw.proxys.co:8000");
curl_setopt($ch, CURLOPT_PROXYUSERPWD, "USERNAME-country-us:PASSWORD");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
echo curl_exec($ch);

Before you start

Replace USERNAME and PASSWORD with a sub-user's credentials from the dashboard. Change -country-us to the country you need, or remove it for a random location. See targeting options for city, ASN and sticky sessions.

Try 1 GB for $1