BashScripts.org
http://bashscripts.org/forum/

Command cURL
http://bashscripts.org/forum/viewtopic.php?f=15&t=1422
Page 1 of 1

Author:  ZER.SHITMAKER [ Wed Jun 29, 2011 3:11 pm ]
Post subject:  Command cURL

Hi all,

when I type :

curl -T /Users/admin/Desktop/up.png -u idhost:passwdhost ftp://ftp.domainname.com/

it answers me :

% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:00:27 --:--:-- 0

curl: (7) couldn't connect to host

I don't understand why.

If you know, please tell me wher's my mistake and give me an exemple of command (curl) for download from a server.

Thanks.

Author:  jsz [ Wed Jun 29, 2011 7:36 pm ]
Post subject:  Re: Command cURL

Are you using a proxy? It may be it, because there is no mistake in your line.

Author:  ZER.SHITMAKER [ Thu Jun 30, 2011 5:02 am ]
Post subject:  Re: Command cURL

ahahah !!! yes ! It was that ! I always use a VPN...

is it possible to download/upload with a proxy ?

secondly, what's the command line to download, for example, the up.png that I just upload onto my server ?

many thanks!

Author:  jsz [ Thu Jun 30, 2011 6:14 am ]
Post subject:  Re: Command cURL

Sure, « man curl ».

Code:
curl -s -U user_proxy:passwd_proxy -x proxy_name:port -u user:passwd -T /Users/admin/Desktop/up.png ftp://ftp.domainname.com/


To download:

Code:
curl -s -U user_proxy:passwd_proxy -x proxy_name:port -u user:passwd ftp://ftp.domainname.com/up.png

Page 1 of 1 All times are UTC - 6 hours
© 2000, 2002, 2005, 2007 phpBB Group • http://www.phpbb.com