Skip to content

Instantly share code, notes, and snippets.

View brunomoraes's full-sized avatar

Bruno Moraes brunomoraes

  • WebStore Solution
View GitHub Profile
$headerData = [];
$counter = 0;
$node = $crawler3->filter('.resultadocdital')->each(function (Crawler $node, $i) use (&$headerData, &$counter) {
//echo $i;
$PATTERN = '/\<strong\>(?<name>[^\<^\>]*)\s?:\s?<\/strong\>(?<content>[^\<^\>]*)/m';
preg_match_all($PATTERN, trim($node->html()), $matches, PREG_SET_ORDER, 0);
// if (!isset($matches[0])) {
try{
$tr_elements = $crawler2->filterXPath('//table/tr');
$result = $crawler2->filter('#ctl00_ContentPlaceHolder1_dlResultados')->html();
//$element = $crawler2->filter("#ctl00_ContentPlaceHolder1_dlResultados > span")->text();
$crawler3 = new Crawler($result);
//$elements = $crawler3->filter('.resultadocdital')->html();