PHP code example of rubobaquero / luminati

1. Go to this page and download the library: Download rubobaquero/luminati library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

rubobaquero / luminati example snippets


$luminati = new Luminati($username,$password,"gen");

$urls = array();
for($i=0;$i<10;$i++){
	$urls[] = array(
		'url' => 'https://www.wikipedia.org',
		'options' => array(
			CURLOPT_USERAGENT => "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36"
		),
		'callback' => 'callback_func',
		'user_data' => array(
			'some' => 'useful data'
		),
		'country' => 'es'
 	);
}

function callback_func($response, $url, $request_info, $user_data, $time){
	echo "We have a response from $url";
}

$luminati->make_requests($urls,5,20);