Hi, are there some libraries i can use (in MS windows) for stuff like, obtaining info from a website? i read something about sockets once, but im not sure what it is (yes, i googled it :) )

Or would be easier/better, as some suggest, to learn java or python? (or perhaps javascript could do??)

Recommended Answers

All 13 Replies

Python has a great support of internet.
If you want it do it C++, things can go messy.
If you are to only develop apps for MS Windows, they have winsock library. Use it.
For cross-platform support Boost's Asio is a good one.
Best of luck

Thank you :) i will get to it right away then :)

BTW, I will be programming in C++, would you recommend learning python, and then running the python programs trough c++ (seems clumsy) or using one of the libs you mentioned?
any change you know where to find a good tut on the 2 libs?

It seems to be hard, finding the way around the boost asio header files. Or is it just me?

>>would you recommend learning python, and then running the python programs trough c++ (seems clumsy)
No, I don't

>>or using one of the libs you mentioned?
>>any change you know where to find a good tut on the 2 libs?
This is much better. Use the winsock if you intent to write only for windows.

>>It seams to be hard, finding the way around the boost asio header files.
>>Or is it just me?
No, it is not just you. It is a hard fact that Boosts documentations are very breif and true to point. You have to help yourself if your using Asio

commented: Thank you for your answers, they are very helpfull +1

I will use winsock then.
Maybe when i get the hang of the techniques i will use asio.

Any chance you know a good tut or know where to find good documentaition for winsocks? i found one that seems OK.
from madwizard.org

But if you happen to know a good one i would appreciate it :)

You absolutely dont need winsock to get infos from a web site (!)
Just use standard Win32 apis (Net, COM, and others)

commented:   +0
commented: oh for God's sake. -1

>>You absolutely dont need winsock to get infos from a web site (!)
The OP says "for stuff like, obtaining info from a website? "
He surely wants to do more rather than just getting info from a website.
To the OP: If you really need to get some info on a website, you can use curl Free and cross-platform

Just use standard Win32 apis (Net, COM, and others)

It's bundled with Windows, so it's part of it already. Along with WinINet.

So if i just want to grab a line or two from a web site (this is not all i want to do)
I could use curl?
Marco93: im not sure i know what you mean :)

Obtaining info is not all i want to do, but knowing an easier way to it cant hurt :)

My idea is (short or long term, i dont know :) ) to make a program that reads the info on checkip.dyndns.com, and then sends it to another computer (i havent completely decided where to send it, i might end up sending it to an ftp server in a .txt file)

But once i'm startet on network related programming (whats the right term?) i would like to be able to do more than that i guess, so i would rather not do to many shortcuts :)

curl can handle HTTP GET and HTTP POST
It also support FTP
So if this is all you want to do, I suggest go with cURL. Its more generic than anything.

>>But once i'm startet on network related programming (whats the right term?)
>>i would like to be able to do more than that i guess, so i would rather not do
>>to many shortcuts
Yeah, then move to Asio

Does curl involve WinApi (like i believe winsock does, or at least it seems that way) ?

I am having huge trouble finding my way around the WinApi :/

Does curl involve WinApi (like i believe winsock does, or at least it seems that way) ?

Probably, but its transparent to us programmers because its cross-platform. It uses the api from whatever platform we want to use it on.

I am having huge trouble finding my way around the WinApi :/

Join the party :) We all have problems with it because it is so huge.

Haha :) glad its not just me then.
It's just all that stuff you have to remember without understanding it, its IMPOSSIBLE! at least C++ functions and syntax make sence.. well, moslty anyway:)

Thank you all for you answers:)

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.