require_once('/phpQuery/phpQuery.php');
echo "<br/>"."<h1>". "Парсинг с сайта HREF"."</h1>"."<br/>";
$url = 'https://nb-bet.com/Results';
$request = curl_init( $url );
$options = array(
CURLOPT_HEADER => false,
CURLOPT_NOBODY => false,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_SSL_VERIFYPEER => true,
CURLOPT_USERAGENT => 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:18.0) Gecko/20100101 Firefox/18.0',
);
curl_setopt_array( $request, $options );
$result = curl_exec( $request );
curl_close( $request );
$pq=phpQuery::newDocumentHTML($result);
$links = $pq->find('span > .a-dotted-hover');
foreach ($links as $link) {
$pqLink = pq($link); //pq делает объект phpQuery
$href[] = $pqLink->attr('href');
}
phpQuery::unloadDocuments($pq);