I want to parse an external html page using cURL
.
This is my simple code :
$ch=curl_init($url);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch,CURLOPT_HEADER,0);
$data=curl_exec($ch);
curl_close($ch);
But i don't know how to access and echo my wish tag (for example a div
with class="news"
)
Note:I don't want to usesimple_html_dom
.it's slower than cURL and causes some errors for me.