Send PostData and read URL Please Help!
-
Hi, I am trying to read a webpage, but to view the webpage PostData must be sent to the server. How do you do that? The PostData is long (ASP.Net, so includes the __VIEWSTATE). I just dont know how to send a post back to the server. I am sure its simple, but I have searched and cant find anthing. Please help me, I have been stuck on this for weeks. Thanks, Mike
-
Hi, I am trying to read a webpage, but to view the webpage PostData must be sent to the server. How do you do that? The PostData is long (ASP.Net, so includes the __VIEWSTATE). I just dont know how to send a post back to the server. I am sure its simple, but I have searched and cant find anthing. Please help me, I have been stuck on this for weeks. Thanks, Mike
Lucky the code machine wrote:
I am sure its simple
Really? It is? Do you know how to perform an HTTP POST request? Do you know what the POST data requirements are for the page? Do you know how to form __VIEWSTATE data? Do you know if the site requires a session cookie? If it does do you know how to manage the cookie? Try reading the first thread in the forum "How to get an answer to your question". Pay attention to Item #2.
led mike
-
Lucky the code machine wrote:
I am sure its simple
Really? It is? Do you know how to perform an HTTP POST request? Do you know what the POST data requirements are for the page? Do you know how to form __VIEWSTATE data? Do you know if the site requires a session cookie? If it does do you know how to manage the cookie? Try reading the first thread in the forum "How to get an answer to your question". Pay attention to Item #2.
led mike
I'm sure it's simple. mmm cookies and fish... :beer:
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
Lucky the code machine wrote:
I am sure its simple
Really? It is? Do you know how to perform an HTTP POST request? Do you know what the POST data requirements are for the page? Do you know how to form __VIEWSTATE data? Do you know if the site requires a session cookie? If it does do you know how to manage the cookie? Try reading the first thread in the forum "How to get an answer to your question". Pay attention to Item #2.
led mike
led mike wrote:
Do you know how to perform an HTTP POST request?
No, this is what I need to know.
led mike wrote:
Do you know what the POST data requirements are for the page?
Yes. I have monitored an IE session and trapped the outgoing HTTP post.
led mike wrote:
Do you know how to form __VIEWSTATE data?
Yes, the viewstate will not change, so I will be sending it back as the server sent it out.
led mike wrote:
Do you know if the site requires a session cookie? If it does do you know how to manage the cookie?
It does not require a session cookie. So, to be more specific with my question: How do I perform a HTTP POST request in C++?
-
led mike wrote:
Do you know how to perform an HTTP POST request?
No, this is what I need to know.
led mike wrote:
Do you know what the POST data requirements are for the page?
Yes. I have monitored an IE session and trapped the outgoing HTTP post.
led mike wrote:
Do you know how to form __VIEWSTATE data?
Yes, the viewstate will not change, so I will be sending it back as the server sent it out.
led mike wrote:
Do you know if the site requires a session cookie? If it does do you know how to manage the cookie?
It does not require a session cookie. So, to be more specific with my question: How do I perform a HTTP POST request in C++?
There are a number of classes (MFC WinInet library / Socket classes) and/or API's (WinInet API) all the way down to just using the Winsock API. Of course all of these classes and API's are well documented on the MSDN Web site. When using any of these solutions knowledge of the HTTP protocol[^] could prove valuable, but that's up to you.
Last modified: after originally posted -- sorry about the forum mix up, my bad
led mike