title: Scraping a website for price data using PHP but it returns zero(==$0) may be the website is blocking me. How to over come it?
body: <p>This is the code that i have used:</p>
  
  <pre><code>$curl = curl_init("https://www.flipkart.com/curren-cu2-345656-analog-watch-boys-men/p/itmeax4wh4ujcfft?pid=WATEAX4WGYNYWVCM&amp;srno=b_1_1&amp;otracker=hp_omu_Deals%20of%20the%20Day_5_15c7e867-d35a-4431-a4a0-da39f043bc1f_0&amp;lid=LSTWATEAX4WGYNYWVCMHVLY32");
  curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
  curl_setopt($curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.224 Safari/534.10');
  $html = curl_exec($curl);
  curl_close($curl);
  
  $dom = new DOMDocument();
  @$dom-&gt;loadHTML($html);
  
  $xpath = new DOMXPath($dom);
  $tableRows = $xpath-&gt;query('//*[@id="container"]/div/div[2]/div[2]/div/div/div[1]/div/div[2]/div/div[2]/div[2]/div[1]/div/div[1]');
  echo $tableRows[0];
  echo $tableRows[1];
  echo $tableRows[2];
  
  foreach ($tableRows as $row) {
      echo $row . "&lt;br&gt;";
  }
  </code></pre>
  
  <p>It shows zero, while i open the source in F12 developer mode it shows "==$0" adjacent to the div, how to i overcome this ?</p>