如何从网上下载文件

大家好,我想用给定的地址从因特网中下载文件到本地,有啥可用的API函数吗?
比如我想下载http://www.xxx.com/1.jpg

顶顶更健康

网上可以找到各种各样的函数库,port一个就好了。

也可以自己写一个,建个连接,发个GET命令也不是很麻烦的事。

倒是有个控件可用,但不知你的是不是图形系统?

PtWebClient

Pt_ARG_WEB_DOWNLOAD (write only)
C type Pt type Default
char *, char * String N/A

This resource lets you download a file without having to wait for the Pt_CB_WEB_UNKNOWN callback to provide a file. The value argument of PtSetArg() should contain the URL of the file to download and the len argument should contain the filename to save it as.

xtang:
能否说的详细点,要用什么函数建立连接?

nakeyfish:
我用的是Photon,可以用这个控件试试,谢谢