Hey LG,
I want to get into programming a bit more.
I've always wanted too - to create nifty bots and etc...
But I always get stuck and end up quitting.
I think at the moment I do have the determination to carry on though.
I've chosen C++ as the language I want to try coding in for now, Since I'm learning it at college (will be again when college resumes).
Although at the moment we've only been taught the basic things in C++
(Took them a year, too. Covering shit like loops and functions managed to take them a year.)
(Fuck education =_=)
A quick search on how to send HTTP GET/POST requests using C++ has directed me to LibCurl.
I have absolutely no idea on how to implement said Libraries into my Visual Studio and then how to use said libraries.
I'm just at the moment trying to search for any decent tutorials which explains things in english and not what seems to be fucking binary on crack.
So, I wanted to ask you guys a few questions:
- Is there any way other than LibCurl to send requests in C++?
- Have you got knowledge in C++ and LibCurl?
- If yes to the above - could you send me and tutorials that helped you when you were learning?
- Also if yes to the question - mind if I ask you for help if I get stuck later on?
- On a scale of 0-10, how hard do you think it would be to learn how to use LibCurl and C++ together to make a program?
- How many times do you think my head will explode while trying to learn this?
Results 1 to 4 of 4
- 03 Aug. 2013 05:45pm #1
LibCurl and C++ - How much head exploding am I in for?
- 03 Aug. 2013 10:48pm #2
If you're simply trying to dive into bot making why is C++ your lang of choice? Personally I think you should start with something more beginner friendly -- like AutoIt, Visual Basic, Python, etc. More documentation, support, tutorials, etc. Also myriads easier.
If you want to use it as a general purpose language, that's understandable, but for the niche of bot making it doesn't seem like a very apt selection. If I were you I would wait until I get the hang of bot making/coding in general before trying to just delve into C++ for bots. Or use it if necessary (i.e. you need a more powerful, compiled language). That's my opinion anyway.
Anyway to the point, there are many libraries/APIs for HTTP requests and web interaction. cURL is not your only option. There's the Qt Framework libraries, there should be a winhttp wrapper somewhere around the web, etc. I assume you're using Visual C++, so GUI applications shouldn't be too difficult to manage for you. But it's still more of a pain than just using a simpler language like VB.
So to say the least, the headache should be greater than taking an easier approach.
To answer your questions:
- Yes, see above.
- Not necessarily, no.
- I dropped a few sources at the bottom of my post.
- Post issues you run into in the Programming forum and I'm sure someone will assist you.
- 6. On a scale of redundancy, 9. You could use something else. But if you're absolutely sold on using C++/LibCurl, then that's entirely your choice.
- Ad infinitum. Just kidding, depends on how well you adopt all of it. If you're fairly experienced in C++ and know a bit of web programming in general, then I imagine it couldn't be too difficult.
Tutorials/Sources:
Qt HTTP requests - Creating an HTTP network request in Qt - Nokia Developer Wiki (google query "Qt HTTP requests in C++")
Google - Google
General HTTP requests in C++ - httprequest - How do you make a HTTP request with C++? - Stack Overflow
Apparently this is a WinHTTP wrapper in C++? A Fully Featured Windows HTTP Wrapper in C++ - CodeProject
What you're looking for is cURL tutorials/a LibCurl wrapper, though. In which case refer to the links above.
Additionally, Stack Overflow is also a helpful site if you experience problems in your code and need detailed solutions.
Edit: Also I recommend creating easier bots and working your way up to the more difficult ones. That way you've got some know how under your belt before you try making something bigger. But that's common sense.Last edited by The Unintelligible; 03 Aug. 2013 at 10:56pm.
I'm lightning on my feet
- 03 Aug. 2013 11:19pm #3
Seems like he covered it.
Making bots and such in C++ is doable but not desirable to most.
As for GET/POST requests, there are many ways other than libcurl. Look around.
Start with Stack Overflow like The Unintelligible advised.
Feel free to ask for any help here.
I have a bit of experience in C++ but chances are I'll be learning along with you.
On a scale to 0-10 C++ in its entirety would probably be about a 5.
Really it's what you're doing with it though.
SamsTeachYourself C++ is a great book, as well as Accelerated C++: Practical Programming by Example written by Andrew Koenig.
That's where I started out. Best of luck.
Again, feel free to ask questions, it'd give this forum some activity.I don't get tired.
- 04 Aug. 2013 12:32am #4
I'm not going into Visual C++ solely for bot creation, I plan on having the knowledge of it for any future careers I may get out of it.
I've always been interested in learning the language, and I'm not going to back away purely because it's more difficult than others to learn.
I've dived a bit into AutoIT before, but I didn't really like it that much at all, honestly.
I know C++ is probably not the most efficient way possible to create bots and it might not even be as flexible as others -
But I do want to give it an attempt anyway.
I really do like nice little neat GUI application programs, I've always preferred them over console line command programs.
I don't really know why, but I've always found typing something into a text box and pressing a button much more 'User Friendly' than typing in a command.
Don't know why really. It's just personal preference too.
I will be searching into more libraries and API's for web interaction, but I wouldn't mind giving cURL a shot first.
I haven't heard of the Qt Framework Libraries but then again this is my first time actually diving into something such as this.
Usually I just stick into website exploitation, not botting.
But since there seems to be a distinct lack in bots - I really would like to learn and try and start contributing to the website a bit more, even if that is a long way from now.
I don't want to take the easier approach because then I won't learn as much as I would going the harder route.
Throwing myself into the frying pan right off the bat will probably give me the kick in the ass I need to do this.
Hmm, for the last answer I think I need to find that on loop GIF of Mind Blown and add it as my signature now.
Thank you very much for the tutorials and sources you've linked in your post!
I'll be checking them out tomorrow as it's getting quite late here.
Yes, I plan on working my way up slowly, but I want to try and keep it all in one main program.
The first step was to make a Daily Chance Collector part - since that is like the "Hello World" equivalent of the Gaia Bots.
Although I honestly think I might not make it that far. The login seems like it will be the biggest hurdle so far.
I might have to ask Stack Overflow to give me a few hints / tips on how to directly take hidden field values and names and add them to the request.
Because I believe that's what gaia's login needs now in order trk.
Not only that but then I have to encrypt the password with the token to make the chap.
Oh god damnit Gaia you have to make things a pain in the ass don't you. =_=
Thanks, I'll ask if I get stuck.
Those books seem like good ones.
I do know that our college's library has some C++ books around, I'll look for those titles while I go collect some.
Yeah, this website as a whole could do with a bit more activity. :<