title: Web scraping using php
body: <p>M trying to crawl some data from a URL 
  with the help of simple html dom.
  But when id start my crawler its giving an error </p>
  
  <p>** failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found**</p>
  
  <p>i have tried cUrl but 404 error is thrown.</p>
  
  <p>here my php simple dom code</p>
  
  <pre><code>function getURLContent($url)
  {
  $html = new simple_html_dom();
  $html-&gt;load_file($url);
      /* i perfome some opetions here*/
  }
  </code></pre>
  
  <p>and with cUrl</p>
  
  <pre><code>$curl = curl_init();
  curl_setopt($curl, CURLOPT_URL, $url);
  curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($curl, CURLOPT_HEADER, false);
  $data = curl_exec($curl);
  echo $data; 
  curl_close($curl);
  </code></pre>
  
  <p>How could i do this..?</p>
  
  <p>Thanks in advance..</p>