Get page immediately after html post
-
i am developing a MFC client application that package some data and post back to web server using HTTP. the targeted url is a aspx page that will process the html form and return me some content..XML. CInternetSession session; CHttpConnection* pConnection = 0; CHttpFile* phttpFile = 0; i managed to post a data to a server using; phttpFile->OpenRequest(...) phttpFile->SendRequest(...) the web server successfully receives the POST and will return html or xml. how do i get the response from the web server, after the SendRequest()...? thanks meng
-
i am developing a MFC client application that package some data and post back to web server using HTTP. the targeted url is a aspx page that will process the html form and return me some content..XML. CInternetSession session; CHttpConnection* pConnection = 0; CHttpFile* phttpFile = 0; i managed to post a data to a server using; phttpFile->OpenRequest(...) phttpFile->SendRequest(...) the web server successfully receives the POST and will return html or xml. how do i get the response from the web server, after the SendRequest()...? thanks meng
Something like this :-
//... CInternetSession conn; CHttpConnection *phttpconn; phttpconn= conn.GetHttpConnection(m_server, (INTERNET_PORT )80); CHttpFile* phttpfile = phttpconn->OpenRequest("GET", cmd); BOOL b1=phttpfile->SendRequest(); //... CFile f2(s,CFile::OpenFlags::modeCreate | CFile::OpenFlags::modeWrite); while(true) { n=phttpfile->Read(buff2,127); buff2[n]=0; f2.Write(buff2,n); if(n<127) break; } f2.Close(); //...
Regards, Nish
Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]
-
Something like this :-
//... CInternetSession conn; CHttpConnection *phttpconn; phttpconn= conn.GetHttpConnection(m_server, (INTERNET_PORT )80); CHttpFile* phttpfile = phttpconn->OpenRequest("GET", cmd); BOOL b1=phttpfile->SendRequest(); //... CFile f2(s,CFile::OpenFlags::modeCreate | CFile::OpenFlags::modeWrite); while(true) { n=phttpfile->Read(buff2,127); buff2[n]=0; f2.Write(buff2,n); if(n<127) break; } f2.Close(); //...
Regards, Nish
Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]
Nishie, you are showing them how to write html filters... And later you'll complain...:-D
How low can you go ?
(MS retrof_u_ck) -
Nishie, you are showing them how to write html filters... And later you'll complain...:-D
How low can you go ?
(MS retrof_u_ck)__Stephane Rodriguez__ wrote: Nishie, you are showing them how to write html filters... And later you'll complain... LOL Stephane :-D You got me there alright ;-) Nish
Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]