Ne radi ...
<?php
$dom = new DOMDocument();
@$dom->loadHTMLFile('http://www.popusti.rs/offer/today');
$xpath = new DOMXPath($dom);
$entries = $xpath->query("//div[@id='wrapper']//h3//a/@href");
$output = array();
foreach($entries as $e) {
$dom2 = new DOMDocument();
@$dom2->loadHTMLFile('http://www.popusti.rs' . $e->textContent);
$xpath2 = new DOMXPath($dom2);
$data = array();
$regex = '!\.LatLng\(\s*(\d+\.\d+)\s*,\s*(\d+\.\d+)\)!';
preg_match($regex, $str, $match);
$data['lat'] = $match[1];
$data['lng'] = $match[2];
$output[] = $data;
}
echo '<pre>' . print_r($output, true) . '</pre>';
?>
|