尝试连接到远程服务器上的我的脚本,curl
但是:
col-pos-spd# curl -v http://***:80/monitor/reply.php
* About to connect() to *** port 80 (#0)
* Trying 83.xxx.xxx.2... Connection refused
* couldn't connect to host
* Closing connection #0
curl: (7) couldn't connect to host
然后我尝试了wget
一下:
wget -v http://***/monitor/reply.php
--2011-09-22 12:29:07-- http://***/monitor/reply.php
Connecting to 83.xxx.xxx.2:3128... connected.
Proxy request sent, awaiting response... 200 OK
Length: 8 [text/html]
Saving to: `reply.php'
100%[====================================================================================================================>] 8 --.-K/s in 0s
2011-09-22 12:29:07 (1.05 MB/s) - `reply.php' saved [8/8]
所以我不知道我为什么会遇到错误curl
以及如何避免它?
答案1
答案2
我遇到了同样的问题,我刚刚解决了!
答案是打开 PSAV 模式,因为 curl 默认使用 FTP 的 PORT 模式。使用方法如下:
curl --ftp-port 21 ftp://your.address