Hey everyone,

I'm trying to make a C++ program that inputs data into a web page.

For example make a program that takes an input and enters it on the google search box and presses the enter button for you!

Can anyone help me? Any codes or ideas where to start? I'm a beginner w/ C++ and i want to do this because i have to input data into a web page for my work a lot...

Also I have seen this done with a C++ program, but the author wouldn't share the code with me... :( , i kno he used chilkatdotnet2.dll in his program file, but i dunno how the heck he used it...

Thank you ahead of time!!

Dani AI

Generated

This thread shows the common split between concern about abuse and the practical task at hand. clarified the goal is legitimate workplace automation; and raised valid cautions about bots and spam; pointed out a simple macro-style approach may be sufficient. Three practical routes cover most real-world cases, chosen by whether the site accepts raw HTTP requests, uses heavy JavaScript/AJAX, or requires a real browser UI.

First option: submit form data at the HTTP level. Use the browser Developer Tools (Network tab) to capture the form action, input names, headers, cookies and any hidden tokens, then replay those requests programmatically. This is fast and stable when it works. For C++, a common choice is libcurl to perform GET/POST requests; add an HTML parser if response parsing is needed. If the site uses CSRF tokens, authentication, or dynamic JS-built requests, this becomes more complex.

Second option: drive a real browser. Modern WebDriver automation handles JavaScript-heavy sites reliably. Selenium WebDriver is the common cross-browser tool; C++ can call WebDriver endpoints or invoke a small helper in Python/Java to do the browser work. On Windows, embedding or automating a browser control via COM is another native route (requires COM experience).

Third option: GUI macros. Tools like AutoHotkey or AutoIt are quick to script for simple, local tasks but are fragile against layout changes.

Recommended workflow: export the spreadsheet to CSV, inspect one manual submission with DevTools (Chrome Network docs), automate a single row, verify server-side success, add error handling, logging and rate limits. Prefer an official API or vendor-supported method when possible and respect terms of service to avoid unintended abuse.

Recommended Answers

All 5 Replies

um, trying to exploit Google page rankings is a significant problem even for experts.. as a "beginner", you'll be better served trying to program a Sudoku game or something...

but, if you're really intent on trying to hack some websites, most SkriptKiddi3Z prefer Perl for this sort of task...


.

um, trying to exploit Google page rankings is a significant problem even for experts.. as a "beginner", you'll be better served trying to program a Sudoku game or something...

but, if you're really intent on trying to hack some websites, most SkriptKiddi3Z prefer Perl for this sort of task...


.

I don't think that's what he wants to do.

I think he wants to make a macro to put something in google?

In that case he's trying to make a bot. I'm not going to assist in a program that causes more spam.

NO NO NO NO

you all got me WRONG !! i dont care bout hacking, bots, or spam...

Im doing this bkz at my job i have to enter in data into a website from data on an excel file...

I figured that if i could take data from the excel file and put it on a notepad file, then use the <fstream> and put it all and submit it one at a time w/o all the button clicking i'd save myself time !!!

THATS WHY I WANTED TO KNO IT W/ JUST GOOGLE THAN I'LL ADAPT IT TO MY ISSUE

.....

i dunno, dude. it sure sounds suspiciously like a google bomb to me... not that google hasn't already dealt with about a million such attempts already.

but okay, let's say it is for the legit task you describe.

my First recommendation to you -- as a self-described beginner -- would be to consider using Perl for this sort of work. theres stuff already written in Perl to do exactly what you describe.

my Second recommendation to you is (no matter which language you choose) to start coding, get stuck, then come back for specific help

people here generally will not write your code for you. sometimes you get lucky, but not on this kind of project.

so, get started.

.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.