Catch text inside a div with preg_match [duplicate]

0

When I include the < of Div opening, my array returns empty

$curl = curl_init();


$url = "http://www.adorocinema.com/filmes/filme-216315/";

curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);

$result = curl_exec($curl);


 preg_match_all('/div class="titlebar-title titlebar-title-lg"/i',$result, $matches);



print_r($matches);

curl_close($curl);

this is the full div:

<div class="titlebar-title titlebar-title-lg>filme</div>"/i

Without opening and closing value is found:

class="titlebar-title titlebar-title-lg"/i

Could anyone help me?

    
asked by anonymous 08.08.2018 / 03:15

0 answers