Skip to content

Instantly share code, notes, and snippets.

@Tilotiti
Created July 10, 2018 08:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Tilotiti/6226a69016cfea3b854df9069502e46b to your computer and use it in GitHub Desktop.
Save Tilotiti/6226a69016cfea3b854df9069502e46b to your computer and use it in GitHub Desktop.
Luminati - Residential single session
<?php
$username = 'lum-customer-****-zone-residential';
$password = '*********';
$port = 22225;
$user_agent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36';
$session = mt_rand();
$super_proxy = 'zproxy.lum-superproxy.io';
$url = 'https://www.domaintocrawl.com/';
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_USERAGENT, $user_agent);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl,CURLOPT_ENCODING , "gzip");
curl_setopt($curl, CURLOPT_PROXY, "http://$super_proxy:$port");
curl_setopt($curl, CURLOPT_PROXYUSERPWD, "$username-country-fr-dns-local-session-$session:$password");
curl_setopt($curl, CURLOPT_HTTPHEADER, [
'authority: www.domaintocrawl.fr',
'cache-control: max-age=0',
'upgrade-insecure-requests: 1',
'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
'accept-encoding: gzip, deflate, br',
'accept-language: fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7,und;q=0.6',
'cookie: pj_policy_cookie=1',
'x-lpm-session: '.rand(0, 10000000)
]);
$result = curl_exec($curl);
$scraped_page = $result;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment