Hey guys,
I am tousif and found this wonderful community while searching for some programming help. after seeing lots of good people and helping hands here i think my questions will be answered the best here.
I have been trying to make some softwares or bots using c#. I have a good knowledge about c and c++ and after some search found that c# will suit me the best. Am i rite?
I did lot of search but couldn't find the right place or right tutorial to make things i wanted with c#. My main aim is web based softs.
For eg: ww*w.*addnewfriends.*com/ (please remove the *)
I want to make something like this.![]()
What do you guys have to say about this? Where do you think I should start my programming venture.
Any input will be much appreciated and thanked.
Thank You
Well as I see it, certain languages are better for certain things. Generally if I make anything with a GUI I will use C#. But for developing console applications I will probably just use ruby because of the ease of coding.Originally Posted by tousif1988
Well, I didn't go to the link but C# has some nice http and web libraries. So this shouldn't be too difficult. I wrote a chatroom bot for another site in C#, here is a piece of code that simply loads a page and returns the output (HTML);Originally Posted by tousif1988
The cookies part is optional.Code:string load_web_page(string url){ // loads a specific webpage
WebClient client = new WebClient();
client.Headers.Add("Cookie", cookie);
try
{
string ret = client.DownloadString(url);
return ret;
}
catch (WebException we) { return we.Message + "\n" + we.Status.ToString(); }
catch (NotSupportedException ne){ return ne.Message;}
}
Thank you triggerhappy. Your suggestion was a lot of help and i did a nightlong search on ruby and I think this is what i wanted.
Thanks again
Tousif.
Looks like a web browser automation app. I posted some myspace automation code on here in Delphi:
How to Log into Website Using Visual basic and retrive the information?
That will log into myspace and change your bio. the same idea would enable you to automate a user search on myspace, navigate to each user and click "add as friend" with a predefined message.
See what you think.
Buzz PHP Class Library - Web Components Made Easy!
http://www.buzzphp.com/
thank you alienkinetics. Thats a cool application. I want to do something similar to that. So what do you think I should start with.
Ruby is kinda cool. The fact that twitter is also made on ruby makes me excited. Can i make web browser automation with ruby because its easy to learn too.
Ive looked into ruby, but I wouldn't use it for a Window's application. The IE web browser control is a ActiveX control, so you need a language that has COM/ActiveX support. Standard C/C++ does, but it is somewhat hairy.
Delphi and VB are nice for this task because they both supoprt OleVariants and enable you to write "run-time binding" code, so you dont need to have the latest headers. Run-time binding is like JavaScript. The code will compile, and you only get an error when the code is run, and you get an error like "The method .... is not supported'. It also means a lot of VB/JS code will convert to Delphi with minimal changes.
I dont know if Ruby has that kinda OS system support. C# might be a good choice, but I dont know how Ole works in C#. I know you can register the webbrowser control, but you need access to the DOM.
I recommend Delphi if you have it, because of these free controls:
Downloads EmbeddedWB
You can try standard HTTP commands, but if the site uses cookies or relies on JavaScript submissions, then you can be stuffed. Again, I use Delphi because of the fantasic Indy Component Library, which has a great HTTP control.
But, just be prepared to update your code a lot. It just takes a small change in the myspace site for your code to stop working. So, if you do make a site automation product, when your code detects exceptions being thrown, then you need to refer users to upgrade.
Buzz PHP Class Library - Web Components Made Easy!
http://www.buzzphp.com/
hey alienkinetics, I followed your suggestion and have got delphi now. This software looks pretty cool and kind of attractive. lol. I am greatful to you for your advice.
I just want one more small help. Can you suggest me a good site for tutorials on delphi or a good book or any video tutorials sessions.
Thank you
Ruby has an awesome NET::HTTP Class, makes dealing with web-stuff a piece of cake.
oh.....now I am kinda confused.
To be true, Ruby still attracts me a lot. lol .
Can you please guide me to some good tutorials for ruby. Maybe then I can decide which one to go for.
Thanks again triggerhappy.![]()
Well, ruby's documentation is all you really need for a tutorial;
Class: Net::HTTP
And if you're making console applications I would choose ruby. It's really easy to learn.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks