Hi,
I'm trying to use curl to fetch a file from the net but with the curl_ini() in the php file I get the message "The document contained no data. Try again later,..." from the Apache server. It doesn't even print the "Fetiching file:..." text.
Anyone know whats going with this. Or any other simple ways to get files with HTTP/FTP protocols.
print "Fetching file: ".$url;
$ch = curl_init($url);
$fp = fopen($localpathpath."/".$filename), "w");
curl_setopt ($ch, CURLOPT_INFILE, $fp);
curl_setopt ($ch, CURLOPT_HEADER, 0);
curl_exec($ch);
curl_close ($ch);
fclose ($fp);
Petri