|
From: <php...@li...> - 2010-02-05 09:23:31
|
FWIW, and for anyone else it might help, I'm trying a CURL approach instead:
$fp = fopen($temp_file_name, "w");
// Configuration of curl
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $host . $file);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_BUFFERSIZE, 8192);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FILE, $fp);
curl_exec($ch);
$curl_info = curl_getinfo($ch); // Tests for success later
curl_close($ch);
fclose($fp);
if (is_resource($fp)) {
fclose($fp); // CURL bug
}
Look out for the need to double-close the file resource - bugfix went in
Sept 2009 but isn't in PHP 5.2.10 which isn't *that* old.
If there is any known conflict with PGP-CGI or JavaBridge, could you let
me know? It might save many hours of pain and misery with testing...
Cheers,
Mark...
|