title: ajax with html issue
body: <p>I want to get the html of a website to check it for links,
  I use the following ajax code to get the html of a remote website:</p>
  
  <pre><code>$.ajax({
    type : 'get',
    url : 'proxy.php',
    dataType : 'html',
    success : function(data){
      alert('success');
    },
    error : function(XMLHttpRequest, textStatus, errorThrown) {
    alert('error');
    }
  });
  </code></pre>
  
  <p>proxy.php is the proxy I use to get the data because it is not on my server :</p>
  
  <pre><code>&lt;?php
  // Set your return content type
  header('Content-type: application/html');
  
  // Website url to open
  $daurl = 'http://example.com';
  // Get that website's content
  $handle = fopen($daurl, "r");
  
  // If there is something, read and return
  if ($handle) {
      while (!feof($handle)) {
          $buffer = fgets($handle, 4096);
          echo $buffer;
      }
      fclose($handle);
  }
  ?&gt;
  </code></pre>
  
  <p>the code always alert the error and I can not understand is everything is OK because I am not expert with ajax so I want anybody that could check that for me? is it wrong ajax datatype? is it wrong header in proxy file please???</p>