if ($newxml) { $search_results = $newxml->xpath($scrubber_xml->xpath->domain); if (!empty($search_results)) { foreach ($search_results as $search_result) { $domain = $search_result->div[0]->span->__toString(); $rank = explode(" ", $search_result->div[1]->span->attributes()->class->__toString())[1]; if ($rank == "r1" || $rank == "r2") { file_put_contents("domains.txt", $domain . PHP_EOL, FILE_APPEND); } } } } AngryCurl::add_debug_msg("->\t" . $request->options[CURLOPT_PROXY] . "\tOKAY\t" . $info['http_code'] . "\t" . $info['total_time'] . "\t" . $info['url']); return; } echo "nothing happens!\n"; } $AC = new AngryCurl('nothing'); $AC->__set('window_size', 20); $AC->load_useragent_list('./lib/useragent_list.txt'); $AC->__set('use_proxy_list', false); $AC->__set('use_useragent_list', true); $doc = new DOMDocument(); $doc->strictErrorChecking = FALSE; $doc->load("config.xml"); $scrubber_xml = simplexml_import_dom($doc); $xml = new SimpleXMLElement('<xml/>'); for ($i = 199; $i < 999; $i++) { $AC->get("https://www.mywot.com/en/scorecard?page=" . $i); } $AC->execute();
# Setting time and memory limits ini_set('max_execution_time', 0); ini_set('memory_limit', '128M'); define('AC_DIR', dirname(__FILE__) . DIRECTORY_SEPARATOR . '..'); # Including classes require_once AC_DIR . DIRECTORY_SEPARATOR . 'classes' . DIRECTORY_SEPARATOR . 'RollingCurl.class.php'; require_once AC_DIR . DIRECTORY_SEPARATOR . 'classes' . DIRECTORY_SEPARATOR . 'AngryCurl.class.php'; # Initializing AngryCurl instance with callback function named 'callback_function' $AC = new AngryCurl('callback_function'); # Initializing so called 'web-console mode' with direct cosnole-like output $AC->init_console(); # Importing proxy and useragent lists, setting regexp, proxy type and target url for proxy check # You may import proxy from an array as simple as $AC->load_proxy_list($proxy array); $AC->load_proxy_list(AC_DIR . DIRECTORY_SEPARATOR . 'import' . DIRECTORY_SEPARATOR . 'proxy_list.txt', 200, 'http', 'http://google.com', 'title>G[o]{2}gle'); $AC->load_useragent_list(AC_DIR . DIRECTORY_SEPARATOR . 'import' . DIRECTORY_SEPARATOR . 'useragent_list.txt'); /* NOTE: IF USING request() - "on the fly" proxy server changing WILL apply * * You may use request(URL, METHOD, POST_DATA, HEADERS, CURL OPTIONS) to create add new requests * METHOD may be GET or POST * POST_DATA may be an array of POST-params * HEADERS may be any HTTP headers * CURL OPTIONS may be any of supported by CURL */ $AC->request('http://ya.ru'); /* NOTE: IF USING get() - "on the fly" proxy server changing WILL apply * * You may use shorcut get(URL, HEADERS, CURL OPTIONS) to create add new GET requests * HEADERS may be any HTTP headers * CURL OPTIONS may be any of supported by CURL */