问题描述
- js代码得到图片的地址url,有没有办法用c++代码下载url下的图片
- 我的.html 文件里的js代码求得图的url,能不能将这个url传到一个c++代码里,把图片以jpg格式保存到本地的的指定路径下,具体该怎么实现呢
解决方案
http://blog.chinaunix.net/uid-24862988-id-3722069.html
解决方案二:
http://blog.csdn.net/glt3953/article/details/11605009
解决方案三:
用winhttp API,或者libcurl库来下载。
解决方案四:
MFC Classes for Creating Internet Client Applications
Home | Overview | How Do I
MFC provides the following classes and global functions for writing Internet client applications. Indentation indicates a class is derived from the unindented class above it. CGopherFile and CHttpFile derive from CInternetFile for example.
Classes:
CInternetSession
CInternetConnection
CFtpConnection
CGopherConnection
CHttpConnection
CInternetFile
CGopherFile
CHttpFile
CFileFind
CFtpFileFind
CGopherFileFind
CGopherLocator
CInternetException
Global functions:
AfxParseURL
AfxGetInternetHandleType
AfxThrowInternetException
These classes and global functions are declared in AFXINET.H except CFileFind which is declared in AFX.H.