C++Socket编程

  1. c++运用socket获取网页源代码以及strcat与strcat_s的小差别
  2. vc 网络基础编程(socket)
  3. VC++获取CS服务器及玩家比分信息[完整代码]
  4. socket提交http表单[VC]
  5. 使用socket post数据包的正确格式如下:

int len = strlen(_T("memberinfo"))+5;
	sprintf(szMessage,	"POST /NetVerify/verify.php HTTP/1.1\r\n"
						"Content-Type: application/x-www-form-urlencoded\r\n"
						"Host: 127.0.0.1\r\n"
						"User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Firefox/24.0\r\n"
						"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\n"
						"Accept-Language: zh-cn,zh;q=0.8,en-us;q=0.5,en;q=0.3\r\n"
						"Accept-Encoding: gzip, deflate\r\n"
						"Connection: close\r\n"
						"Content-Length:%d\r\n"
						"Cache-Control: max-age=0\r\n\r\n"//多一行空行表示请求头结束
						"type=memberinfo",len);


你可能感兴趣的:(C++Socket编程)