LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   simple networking in c++ (https://www.linuxquestions.org/questions/programming-9/simple-networking-in-c-339312/)

caminoix 07-02-2005 07:23 AM

simple networking in c++
 
hello :)

i'd like to write a simple program in c++ that would go to a couple of websites, extract a few sentences and write them to a file on my disk.

could you please tell me how i could do it or where i could look for help?

NCC-1701&NCC-1701-D 07-02-2005 07:57 AM

Have a look at
http://www.linuxgazette.com/issue74/tougher.html#3.2
Hope it helped! :)

caminoix 07-02-2005 10:16 AM

it looks helpful, thanks :)
still, it doesn't seem too easy, at least at first glance. i'm just beginning my c++, and i'm not desperate to stick with it.
could you tell me please whether such a task would be easier with other languages? python perhaps?

ps. it's not for getting mails to spam :) i need it to getting to sites like www.warez.com and extracting the number of users for purely statistical purposes.

NCC-1701&NCC-1701-D 07-02-2005 02:01 PM

Personally, I use(and prefer) more C than C++,not only in socket programming. I don't think it's going to be easier,unless you get familiar.Have a look at
http://pont.net/socket/
http://www.cs.wustl.edu/~schmidt/cs544/socket1.html
for c socket programming. If you find c/c++ to difficult, try using java sockets,
http://www.javaworld.com/javaworld/j...2-sockets.html

I cannot tell you about other languages because i'm unfamiliar with them!
Hope it helped!

caminoix 07-03-2005 05:30 AM

hmm... it doesn't look just too easy :(
i started learning python. i don't yet know what's ahead of me but so far it's gee so easy! i found a nice help on networking in python and it seems like you can get round the whole socket stuff with it. i'll see what i can do and if i can't do it, i'll be back to c/c++.

thank you for help, anyway :)

Michael Johnson 07-03-2005 07:44 AM

I f you have Qt installed it has a QSocket part that I use in my projects. I also use kdevelop for my development.

rjlee 07-04-2005 02:32 PM

This doesn't really sound like a socket-level problem to me. Perl has some rather nice support for various protocols, including SMTP, HTTP and so on, that will probably do the job. Take a look at the modules on http://www.cpan.org


All times are GMT -5. The time now is 01:41 AM.