| |
|
|
|
cURL Mailing List Monthly Index Single Mail
curl-and-php mailing list Archives
RE: problems downloading files with differents ports
From: Jordi Agusti Fonoll <jagusti_at_ivoox.com>
Date: Wed, 28 Jan 2009 13:12:03 +0100
Hi Charoite,
I've added this: curl_setopt($ch, CURLOPT_PORT, 8003); and the problem
About to connect() to 213.97.223.180 port 8003
* Trying 213.97.223.180... * Connection refused
* couldn't connect to host
* Closing connection #0
I'm trying a lot of different options but without any exit.
Regards.
De: curl-and-php-bounces_at_cool.haxx.se
Hi Jordi,
Have you try to set the CURLOPT_PORT option to 8003. Please see
Regards,
Jordi Agusti Fonoll wrote:
Hi people,
I'm using PHP + curl to download from different hosts, it's working
function get_file1($file, $local_path, $newfilename)
{
$err_msg = '';
echo "<br>Attempting message download for $file<br>";
$out = fopen($local_path.$newfilename, 'wb');
if ($out == FALSE){
print "File not opened<br>";
exit;
}
$ch = curl_init();
curl_setopt($ch, CURLOPT_FILE, $out);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_VERBOSE, true);
curl_setopt($ch, CURLOPT_URL, $file);
//curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_exec($ch);
echo "<br>Error is : ".curl_error ( $ch);
curl_close($ch);
fclose($handle);
}
When I try to download this file:
About to connect() to 213.97.223.180 port 8003
* Trying 213.97.223.180... * Connection refused
* couldn't connect to host
* Closing connection #0
<br>Error is : couldn't connect to host
You can see that the file exist and I don't understand why I can't get
Jordi.
________________________________
_______________________________________________
These mail archives are generated by hypermail. |
Page updated November 12, 2010.
web site info