simple php xpath code
<p>I have this code: </p>

<pre><code>&lt;?php
error_reporting(E_ALL ^ E_NOTICE);
ini_set('display_errors', 1);  

$dom = new DOMDocument();
@$dom-&gt;loadHTMLFile('http://www.grupovina.rs/beograd/');
$xpath = new DOMXPath($dom);
$entries = $xpath-&gt;query("//div[@class='deal-medallion-heading']/h1/a/@href"); 
$output = array(); 
foreach($entries as $e) { 
  $dom2 = new DOMDocument(); 
  @$dom2-&gt;loadHTMLFile($e-&gt;textContent); 
  $xpath2 = new DOMXPath($dom2); 
  $data = array(); 
  $data['link']= ($e-&gt;textContent);
  $data['naslov'] = trim($xpath2-&gt;query("//div[@class='deal-medallion-heading']/h1/a")-&gt;item(0)-&gt;textContent); 
  $data['naslov'] .= '. ' . trim($xpath2-&gt;query("//span[@class='deal-medallion-deal-title']/a")-&gt;item(0)-&gt;textContent); 
  $data['slika'] = trim($xpath2-&gt;query("//div[@id='slider']/ul/li/img/@src")-&gt;item(0)-&gt;textContent);
  $data['lat'] = trim($xpath2-&gt;query("//input[@id='latitude']/@value")-&gt;item(0)-&gt;textContent); 
  $data['lng'] = trim($xpath2-&gt;query("//input[@id='longitude']/@value")-&gt;item(0)-&gt;textContent); 
  $output[] = $data; 
} 
echo '&lt;pre&gt;' . print_r($output, true) . '&lt;/pre&gt;';

?&gt;
</code></pre>

<p>and this code not work on www.pluspon.com/grupovina1.php</p>

<p>but work on <a href="http://kupondo.adriamart.com/grupovina1.php" rel="nofollow">http://kupondo.adriamart.com/grupovina1.php</a></p>

<p>WHY? what is problem with my php, server or ... ???</p>
