I need to return some results of the "ex: Digital Agency" search of the first page of Google using preg_match + RegEx, but it is not returning all 10 values in the array, only the first. How do I solve it?
Ex:
$document = file_get_contents('https://www.google.com.br/search?q=Ag%C3%AAncia+Digital');
preg_match_all('/<li class=\"g\">([^']*?)<\/li>/', $document, $matches);
print_r($matches);