Error download file from subdomain in php?
<p>I have a sample code:</p>

<p><code>&lt;a href="www.demo.simple.com/file.zip"&gt;download&lt;/a&gt;</code> </p>

<p>=> result (download from <code>www.demo.simple.com</code>)</p>

<p>But when I using:</p>

<pre><code>$url = 'www.demo.simple.com/file.zip';
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_BINARYTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, $url);

$result = curl_exec($ch);

curl_close($ch);

header("Content-type: application/zip");
echo $result;
</code></pre>

<p>=> result download from <code>www.simple.com</code>
I don't know why using code php download a file from sub domain <code>www.demo.simple.com</code> is popup show info download from from <code>www.simple.com</code></p>
