{"id":1325,"date":"2014-08-26T18:53:36","date_gmt":"2014-08-26T10:53:36","guid":{"rendered":"http:\/\/www.youthtribe.com\/?p=1325"},"modified":"2014-08-27T14:48:05","modified_gmt":"2014-08-27T06:48:05","slug":"mfc-vc_%e6%a8%a1%e6%8b%9f%e7%bd%91%e9%a1%b5getpost%e6%95%b0%e6%8d%ae%e6%95%99%e7%a8%8b%e4%be%8b%e5%ad%90","status":"publish","type":"post","link":"http:\/\/www.youthtribe.com\/archives\/1325","title":{"rendered":"mfc-vc++_\u6a21\u62df\u7f51\u9875get,post\u6570\u636e\u6559\u7a0b\u4f8b\u5b50"},"content":{"rendered":"
\u5173\u4e8evc\u7684\u7f51\u7edc\u7f16\u7a0b<\/strong>\u7684\u4e00\u4e2a\u6982\u89c8\uff0c\u8bf7\u79fb\u6b65\u81f3\uff1a<\/p>\n http:\/\/www.youthtribe.com\/archives\/1323<\/strong><\/p>\n \u5148\u4e0a\u4e00\u4e2avc++ post<\/strong>\u6570\u636e\u7684\u4f8b\u5b50\uff1a<\/p>\n \u5173\u4e8evc\u7684\u7f51\u7edc\u7f16\u7a0b\u7684\u4e00\u4e2a\u6982\u89c8\uff0c\u8bf7\u79fb\u6b65\u81f3\uff1a http:\/\/www.youthtribe.com\/archives\/1323 \u5148\u4e0a\u4e00\u4e2avc++ post\u6570\u636e\u7684\u4f8b\u5b50\uff1a \/\/ http \u94fe\u63a5\u53d8\u91cf CHttpConnection * m_http = NULL ; \/\/m_http\u901a\u8fc7\u4e0b\u8fb9\u7684\u65b9\u6cd5\u53d6\u503c CString strURL = “www.youthtribe.com” \/\/\u4e0d\u80fd\u6709http:\/\/ CInternetSession CIS; m_http = CIS.GetHttpConnection(strURL) ; \/\/chttpfile CHttpFile * pHttpFile = NULL<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1,219,9],"tags":[],"_links":{"self":[{"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/posts\/1325"}],"collection":[{"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/comments?post=1325"}],"version-history":[{"count":3,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/posts\/1325\/revisions"}],"predecessor-version":[{"id":1329,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/posts\/1325\/revisions\/1329"}],"wp:attachment":[{"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/media?parent=1325"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/categories?post=1325"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/tags?post=1325"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}\r\n\r\n\t\/\/ http \u94fe\u63a5\u53d8\u91cf\r\n\tCHttpConnection * m_http = NULL ;\r\n\t\/\/m_http\u901a\u8fc7\u4e0b\u8fb9\u7684\u65b9\u6cd5\u53d6\u503c\r\n\tCString strURL = \"www.youthtribe.com\"\t\/\/\u4e0d\u80fd\u6709http:\/\/\r\n\tCInternetSession CIS;\r\n\tm_http = CIS.GetHttpConnection(strURL) ;\r\n\t\/\/chttpfile\r\n\tCHttpFile * pHttpFile = NULL;\r\n\tpHttpFile = pdlg->m_http->OpenRequest(CHttpConnection::HTTP_VERB_GET,\t\/\/GET or POST\r\n\t\t\t\t\"?p=p\",\/\/\"test\/test.php\",\r\n\t\t\t\tNULL,\r\n\t\t\t\t1,\r\n\t\t\t\tNULL,\r\n\t\t\t\tNULL,\r\n\t\t\t\tINTERNET_FLAG_EXISTING_CONNECT);\r\n\t\/\/\u53d1\u9001header\r\n\tpHttpFile->AddRequestHeaders(\"Content-Type:application\/x-www-form-urlencoded\"); \r\n\tpHttpFile->AddRequestHeaders(\"Accept:*\/*\");\r\n\t\/\/SendRequest,\u56e0\u4e3a\u662fget\uff0c\u6240\u4ee5\u503c\u90fd\u4e3a0\r\n\tpHttpFile->SendRequest(NULL,0,NULL,0)\r\n\t\/*\r\n\t\u8fd9\u4e2a\u662fpost\u7684\r\n\tCString strPost;\r\n\tstrPost = \"p=p\";\t\/\/post\u7684\u6570\u636e\r\n\tpHttpFile->SendRequest(NULL,0,(LPVOID)(LPCTSTR)strSend,strSend.GetLength()); \t\r\n\t*\/\r\n\t\/\/\u83b7\u53d6\u8fd4\u56de\u72b6\u6001\u7801\r\n\tDWORD retcode; \r\n\tpHttpFile->QueryInfoStatusCode(retcode);\r\n\t\/\/\u53ef\u4ee5\u8fd9\u6837\u8bfb\u5b57\u7b26\u4e32\r\n\t\/\/\u4e00\u884c\u4e00\u884c\u7684\u8bfb\r\n\t\/\/\u4e00\u884c\u4e00\u884c\u7684\u8bfb\u51fa\u6765\r\n\tCString strReturn , strLine;\r\n\twhile(pHttpFile->ReadString(strLine))\r\n\t{\r\n\t\tstrReturn = strLine + \"\\n\";\r\n\t}\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"