So your code looks something like this, right?
<?
$url = "http://www.php.net";
$filename = "c:\inetpub\temp.html";
$ch = curl_init($url);
$fp = fopen($filename, "w");
curl_setopt ($ch, CURLOPT_FILE, $fp);
curl_setopt ($ch, CURLOPT_HEADER, 0);
curl_exec($ch);
curl_close ($ch);
fclose ($fp);
?>
If this is the case, then Apache is right. This will return an empty document to the browser because you are sticking the contents of the document into the file not sending it to the browser.
Try this code:
<?
$url = "http://www.php.net";
$ch = curl_init($url);
curl_setopt ($ch, CURLOPT_HEADER, 0);
curl_exec($ch);
curl_close ($ch);
?>
This will send the fetched document to your browser (which should eliminate Apache's message that the document is empty). If you do want to put it into a file, then try echoing something back to the browser as a test:
<?
$url = "http://www.php.net";
$filename = "temp.html";
$ch = curl_init($url);
$fp = fopen($filename, "w");
curl_setopt ($ch, CURLOPT_FILE, $fp);
curl_setopt ($ch, CURLOPT_HEADER, 0);
curl_exec($ch);
curl_close ($ch);
fclose ($fp);
echo "test.";
?>