Hello.
I've been through dozen of tutorials about regex, and obviously still don't understand everything.
I'm trying to get data (a whole DIV field and its contents) from another website, and display it on my page.
It seems to get everything, but the DIV field.
This is what I want: "<div id="s_1">CONTENT</div>"
How am I supposed to do it? This is the code so far:
<?php
$CurlStart = curl_init();
curl_setopt ($CurlStart, CURLOPT_URL, "http://www.supersport.hr/ponuda/client");
curl_setopt ($CurlStart, CURLOPT_HEADER, 0);
$source = curl_exec ($CurlStart);
curl_close ($CurlStart);
$re1='.*?';
$re2='<[^>]+>';
$re3='(<[^>]+>)';
$re4='((.*))';
$re5='(<[^>]+>)';
if ($c=preg_match_all ("/".$re1.$re2.$re3.$re4.$re5."/is", $source, $matches))
{
print $matches;
}
?>