Skip to main content

How to use Infatica Residential proxy with PHP

Once you have created a proxy list at Infatica, you can use a proxy with PHP.

PHP example:

# In this example a query to is performed from the Infatica proxy.

# Change the proxy login, password, IP, and port from your proxy list if you use authorization by login/password.
$proxy = 'http://login:password@Host:Port';
$query = curl_init('');
curl_setopt($query, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($query, CURLOPT_PROXY, "$proxy");
$output = curl_exec($query);
if($output) {
echo $output;