資源簡介
c++HTTP源碼,http post 簡單實現
代碼片段和文件信息
#include?“StdAfx.h“
#include?“AmHttpSocket.h“
#include?se.h>
#include?
#define?AgentName?_T(“Nimo?Software?HTTP?Retriever?1.0“)
//case?insensitive?search?functions...
#ifdef?UNICODE
#define?_tcsustr?wcsustr
#else
#define?_tcsustr?strustr
#endif
char*?strustr(char?*source?char?*s);
wchar_t*?wcsustr(wchar_t?*source?wchar_t?*s);
char*?strustr(char?*source?char?*s)
{
//make?an?uppercase?copy?af?source?and?s
char?*csource?=?strdup(source);
char?*cs?=?strdup(s);
strupr(csource);
strupr(cs);
//find?cs?in?csource...
char?*result?=?strstr(csource?cs);
if?(result?!=?NULL)
{
//cs?is?somewhere?in?csource
int?pos?=?result?-?csource;
result?=?source;
result?+=?pos;
}
//clean?up
free(csource);
free(cs);
return?result;
}
wchar_t*?wcsustr(wchar_t?*source?wchar_t?*s)
{
//make?an?uppercase?copy?af?source?and?s
wchar_t?*csource?=?wcsdup(source);
wchar_t?*cs?=?wcsdup(s);
wcsupr(csource);
wcsupr(cs);
//find?cs?
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????6502??2001-09-01?10:15??AmHttpSocket.cpp
?????文件???????1064??2001-09-01?10:15??AmHttpSocket.h
-----------?---------??----------?-----??----
?????????????????7566????????????????????2
- 上一篇:基于8155的8LED溫度控制器
- 下一篇:計算流體力學中VOF
評論
共有 條評論