what language i need to know for writing bots

forvenz

Regular Member
Joined
Jan 25, 2013
Messages
471
Reaction score
77
you know like GSA , scrapebox ,google/youtube serp checker . all of these great software
what i need to know to code them . i know PHP SQL CSS HTML and all the web bullshit ,and little bit C#
 
You can develop all of the above tools you've mentioned with any programming language like C#, Java or Delphi, just to mention a few. You can certainly develop the bots with C# as you already knew it.
 
i know C# from the start until class . yeah i know this is nothing ,short story long what i need to know in c# to do suck these things
 
if ur still starting in c# and want to build "windows aplication" i would start looking at WPF
if you start doing WPF and want to have a flexible application look into data bindings from viewmodels to xaml, or in short: MVVM patterns. you might like "prism" if u want to make it modular.

for the bot part you can use sockets or http libraries, and run them in multiple threads..
 
Easiest thing to start is with browser automation using C#'s webbrowser control, Watin, SimpleBrowser or similar libraries. There are many such libraries available and choose one of them depending on your requirement.

Complex bots require knowledge to handle HTTPWebRequest & HTTPWebResponse from within the bot.

i know C# from the start until class . yeah i know this is nothing ,short story long what i need to know in c# to do suck these things
 
hi guys its doesn't must to be c# if you think there is better language for the things i need tell me ,and it will be very nice if you refer me to good places to learn .
 
You can make rudimentary bots with the java Robot class. I made a youtube automessenger and account switcher with this. If you want to make more complicated bots you'll have to learn about Sockets which is what I'm doing right now
 
Java Robot class would be better for you for bots writing. But as exactly i know is that there may be complex bots which require knowledge to handle HTTPWebRequest, etc.
 
HttpWebRequest/HttpWebResponse, WebClient or HttpClient for C#
It is easier with requests than with browser emulators in the long run.
Also don't forget the Thread and Task classes and System.Collections.Concurrent namespace.
Download http://fiddler2.com/ and investigate the http headers.


PHP does not support multithreading, you can use fork() to spawn new processes, but i don't think this is the ideal solution and it will be harder to synchronize the processes. Someone that is more proficient in php, might shed some light on this matter.
 
java, after programming c ++ for few years I am going to java for making seo tools and android apps
 
Something a little bit out of the ordinary: Ruby. Its a very fun language and there are many libraries that are perfect for bots. The https://github.com/vcr/vcr and http://nokogiri.org/ come to mind. Additionally there is alot available to run browsers on linux boxes in headless mode.

The cons of using Ruby: It might be slower compared to C#, C/C++ and Java & you have a much harder time programming a decent GUI, altough for a Bot a CLI (Command Line Interface) should suffice and there are great libraries for that too (https://github.com/erikhuda/thor).
 
Something a little bit out of the ordinary: Ruby. Its a very fun language and there are many libraries that are perfect for bots. The vcr gem and nokogiri come to mind. Additionally there is alot available to run browsers on linux boxes in headless mode.

The cons of using Ruby: It might be slower compared to C#, C/C++ and Java & you have a much harder time programming a decent GUI, altough for a Bot a CLI (Command Line Interface) should suffice and there are great libraries for that too (Thor).

I write all my stuff in Ruby, best choice I ever made was to learn it
 
I write all my stuff in Ruby, best choice I ever made was to learn it

I'll have to agree with this. I've been programming for years and although my personal philosophy is most programming languages are the same, and they're just tools and not really a "best" one, I would still highly recommend Ruby.

Why?

- Ruby has been adopted as the language of choice for the Rails community and has HUGE support in the way of it's modules (Gems) it supports.
- Ruby is very, very good at string manipulation. So if you need to do any scraping or logic around strings, Ruby is great.
- Ruby is spiritual successor to Perl, which was probably the most widely used scripting language 10-15 years ago. As such, there's still some old code out there and if you know Ruby, you can read Perl pretty well.

All in all, I'd suggest Ruby, then Python. I'd go with interpreted languages as they're a lot easier to write scripts for and to deploy.

I hope this helps! Best of luck!
 
I do almost everything with PHP/cURL, but yeah there are issues like having to spawn new processes for threading and it being a fucking chore to create a UI. Before I did web apps I did all my bots in VB6/winsock. The Microsoft stuff is easy and you can hack together stuff that works from the top down.

The thing is a few years ago I switched to Mac so the thought of having to program on a PC makes me ill. The .net framework itself is just terrible too. Java would probably be my next choice, but I just haven't made it a point to learn. Not as fast to develop as in PHP but it's fast and you can build good multithreaded cross platform apps, even if you end up just making thin clients to layer over PHP scripts.
 
If you want writing more bots, not only single solution, then I wouldn not recommend you PHP - it has a very poor, or almost none of multithreading functionality.

I am programmer with about 8 years of experience (several years in PHP) and I would suggest you to use Java, with Robot/Apache Http Client.

Remeber that in Java you can write real WEB APPLICATIONS, not only dynamic pages. The differnce is that web application works 100% time with some background services/threads wich
you can monitor throught web interface with servlets and JSP. This is huge difference nad a lot better solution than forcing PHP to constantly refresh with CRON etc.

Of course, Java learning path is a lot more complicated.

And don't listen to ony opinion that Java is slow - if someone say this, then it knows nothing about Java. Java totaly blows php/perl and others in terms of efficiency, only C++ can be a better but not so much.
 
Last edited:
If you want writing more bots, not only single solution, then I wouldn not recommend you PHP - it has a very poor, or almost none of multithreading functionality.

I am programmer with about 8 years of experience (several years in PHP) and I would suggest you to use Java, with Robot/Apache Http Client.

Remeber that in Java you can write real WEB APPLICATIONS, not only dynamic pages. The differnce is that web application works 100% time with some background services/threads wich
you can monitor throught web interface with servlets and JSP. This is huge difference nad a lot better solution than forcing PHP to constantly refresh with CRON etc.

Of course, Java learning path is a lot more complicated.

And don't listen to ony opinion that Java is slow - if someone say this, then it knows nothing about Java. Java totaly blows php/perl and others in terms of efficiency, only C++ can be a better but not so much.

It's true that Java might be as fast as PHP but it is way more bloated than PHP is. However I would say Java is best for these types of applications as coding in Java is -somehow- easy and it's easy to create multi-threaded applications. PHP is a no-go for these things except a few kind of situations when it might come in handy (as php gets even simpler than Java).
 
It's true that Java might be as fast as PHP but it is way more bloated than PHP is. However I would say Java is best for these types of applications as coding in Java is -somehow- easy and it's easy to create multi-threaded applications. PHP is a no-go for these things except a few kind of situations when it might come in handy (as php gets even simpler than Java).

As much as I dislike PHP, it's definitely not a no-go. Robots can be written in PHP and run from the command line. Having said that, Perl, Python and Ruby are much better for bots than Java or anything compiled.
 
PHP is not so good. First, ultra bad multithreading, nad cUrl-multi is a tiny funcionality in concurrency which gives you almost nothing. Also, whole error-handling pipeline is a mess - with PHP, you can write bot in some propabilistic way like, queuing task and then, veryfying all of them - I can't count how many PHP solutions i saw in ma career where creator thought that it just works, maybe with 90% efficiency, but the truth was that it was less than 2-3%. You can have many silent problems with PHP, and it is hard to catch/handle/log all errors in single place, it is very unconsistient and you should always write another bot to verify your primary bot work. In other languages, where all possible errors are thrown as exeptions it is a lot better.

Also real time monitoring is almost impossible in PHP - you can store status in database and monitor it from for example web page - huge workaround and definatelly not real-time.

And definately, not compiled languages (Java is) will be much much much slower, sometimes killing your possibilities (captcah decoding, DOM/HTML parsing etc etc).

Also you can forget about GUI in PHP, and embedding web browser in your application, also you cannot simulate "real mouse" clicks, only some web events with selenium server, which also restricts Bot writing possibilities.

So, definately we can say that is not a good language for writing:
-reliable
-functional
-fast
bots, only some tiny scirpts to scrap/post simple things, or use extarnal simple apis, with small reliabiliti/monitoring capabilities.
 
PHP wasn't made to be multithreaded. If you need multithreading with PHP just write one script to do a job and use the OS to span hundreds of PHP processes, surely your OS is properly multithreaded ;)
 
Back
Top