3个回答
展开全部
#include <CkHttp.h>
#include <CkString.h>
void ChilkatSample(void)
{
CkHttp http;
bool success;
// Any string unlocks the component for the 1st 30-days.
success = http.UnlockComponent("Anything for 30-day trial");
if (success != true) {
printf("%s\n",http.lastErrorText());
return;
}
// Send the HTTP GET and return the content in a string.
CkString html;
html = http.quickGetStr("http://www.w3.org/Protocols/");
printf("%s\n",(const char *)html);
}
2011-08-08
展开全部
char buff[1024*20+1];
typedef int (WINAPI ICEPUB_OPENURL)(char *currentUrlString,char *strHtmlText,int textMaxLen,char *strProxy);
ICEPUB_OPENURL *icePub_openUrl = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_openUrl =(ICEPUB_OPENURL *)GetProcAddress(hDLLDrv,"icePub_openUrl");
}
if(icePub_openUrl)
{
icePub_openUrl("http://www.baidu.com",buff,1024*20,"");
}
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessageBox(buff);
char buffer[1024*20+1];
typedef int (WINAPI ICEPUB_GETURL)(char *hostAddress,char *strObject,char *m_param,char *Referer,char *strHtmlText,int textMaxLen,char *strProxy);
ICEPUB_GETURL *icePub_getUrl = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_getUrl = (ICEPUB_GETURL *)GetProcAddress(hDLLDrv, "icePub_getUrl");
}
if(icePub_getUrl)
icePub_getUrl("www.baidu.com","/","","",buffer,1024*20,"");
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessageBox(buffer);
typedef int (WINAPI ICEPUB_OPENURL)(char *currentUrlString,char *strHtmlText,int textMaxLen,char *strProxy);
ICEPUB_OPENURL *icePub_openUrl = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_openUrl =(ICEPUB_OPENURL *)GetProcAddress(hDLLDrv,"icePub_openUrl");
}
if(icePub_openUrl)
{
icePub_openUrl("http://www.baidu.com",buff,1024*20,"");
}
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessageBox(buff);
char buffer[1024*20+1];
typedef int (WINAPI ICEPUB_GETURL)(char *hostAddress,char *strObject,char *m_param,char *Referer,char *strHtmlText,int textMaxLen,char *strProxy);
ICEPUB_GETURL *icePub_getUrl = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_getUrl = (ICEPUB_GETURL *)GetProcAddress(hDLLDrv, "icePub_getUrl");
}
if(icePub_getUrl)
icePub_getUrl("www.baidu.com","/","","",buffer,1024*20,"");
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessageBox(buffer);
参考资料: icePubDll.dll百度之即可
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
用get方法获取网页内容的代码与这个相类似。修改一下就可以了。
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询