title: Curl return html code when ajax request
body: <p>I using curl to send request to another page and return value to ajax, i have prevented curl redirect to another and just return value to ajax but final result i receive from ajax have contain html code, my code:</p>
  
  <p>php:</p>
  
  <pre><code>                $ch = curl_init();
                  curl_setopt($ch, CURLOPT_URL, 'http://abc.com');
                  curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
                  curl_setopt($ch, CURLOPT_MAXREDIRS, 0);
                  curl_setopt($ch, CURLOPT_RETURNTRANSER, 0);
                  curl_setopt($ch, CURLOPT_POST, 1);
                  curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($params));
                  $data = curl_exec($ch);
                  curl_close($ch);
                  echo 'my value';
  </code></pre>
  
  <p>ajax:</p>
  
  <pre><code>jQuery.ajax({
                  type: "POST",
                  url: "http://pagephp.com",
                  data: data,
                  success: function(result) {
                      alert(result);
                  }
             });
  </code></pre>
  
  <p>alert will show: <code>&lt;html&gt;...&lt;/html&gt; my value</code> </p>
  
  <p>help me</p>