Click here to Skip to main content
15,884,629 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I want to input a large amount of data into a public inquiry website by VC6.0. The main work is on the home page, written with HTML, of the website. There are 2 text boxes where user names and codes inputted in and an OK button. I have many user names and codes but it's very tired input them one by one.

Now I want to write a VC program to realize automatic inputting. The problem on data inputted is that the data is made up by 10 digits including 5 constant and 5 variable. I wanna input a data with changing 5 variables at set intervals, for example 0.5 second. After inputting a data, the target website will pop up a webpage and display query results. Now I wanna manually record the results.

If you have good ideas please teach me, thank you sincerely.
Posted
Comments
ZurdoDev 11-Jan-13 7:50am    
This sounds like a spam bot of sorts. What do you have so far?
Sergey Alexandrovich Kryukov 11-Jan-13 12:10pm    
Unfortunately, I could be, but I hope this is something different. There are many cases when this is desirable. Sometimes you need to deal with stupid sites, for example, to follow some idiotic bureaucratic — I face with such cases once in a while.

Let's ask OP to guarantee that it won't be used for spamming or other malicious activity.

Anyway, I decided to answer, please see.

—SA
tomarrow 11-Jan-13 20:01pm    
I promise I won't be used for spamming or other malicious activity, just for quiry scores. Just as what you said that the information I want,should be open to the public, is difficult to achieve now by idiotic bureaucratic. I hope you can help me
tomarrow 11-Jan-13 20:03pm    
I hope you can tell me the resolvent, for example sopme articles you write on codeproject to solve my problem
Sergey Alexandrovich Kryukov 11-Jan-13 20:06pm    
Thank you for your justification.

I'm pretty much sure the references I gave you should be enough... Is it not?
As to my other posts, I do have some more on the topic, but they reference only .NET API or code.

—SA

1 solution

This is not about HTML at all. Apparently, as this is a Web site, you have to follow HTTP protocol. You need to send HTTP request in exact same way you browser does, most likely using "POST" request method. This is not a problem, because you can always see what a Web page does (what is it, an HTML form or Ajax? must be either one or another).

One of the classes you can possibly use is CInternetSession, according to this answer: http://stackoverflow.com/questions/8563975/how-to-http-post-to-a-web-form-using-c-mfc[^].

See also: http://msdn.microsoft.com/en-us/library/cttkhz64%28v=vs.80%29.aspx[^].

Hope it was available and worked in VC 6.0, too :-).

Alternatively, you can use the wrapper provided in this CodeProject article: A Fully Featured Windows HTTP Wrapper in C++[^].

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900