$curl_handle = curl_init();
curl_setopt($curl_handle, CURLOPT_URL, $link);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, 2);
curl_setopt($curl_handle, CURLOPT_HEADER, 0); // Отображать в ответе заголовки
curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl_handle, CURLOPT_USERAGENT, 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.45 Safari/535.19');
curl_setopt($curl_handle, CURLOPT_HTTPHEADER, array("Content-Type: application/x-www-form-urlencoded"));
curl_setopt($curl_handle, CURLINFO_HEADER_OUT, true);
curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, 0);
$query = curl_exec($curl_handle);
$info = curl_getinfo($curl_handle);
curl_close($curl_handle);
//$info = curl_getinfo($curl_handle);
$html = new simple_html_dom();
$html->load($query);
return [$html, $info];