Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Get page immediately after html post

Get page immediately after html post

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++htmlsysadminxml
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    hui_km
    wrote on last edited by
    #1

    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

    N 1 Reply Last reply
    0
    • H hui_km

      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

      N Offline
      N Offline
      Nish Nishant
      wrote on last edited by
      #2

      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]

      S 1 Reply Last reply
      0
      • N Nish Nishant

        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]

        S Offline
        S Offline
        Stephane Rodriguez
        wrote on last edited by
        #3

        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)

        N 1 Reply Last reply
        0
        • S Stephane Rodriguez

          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)

          N Offline
          N Offline
          Nish Nishant
          wrote on last edited by
          #4

          __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]

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups