Hey guys,

Does anyone have a simple program which can be compiled on visual studio 2010 for windows that opens a socket to a given webpage and allows you to read the html just as you would with a local file? I don't want a html parser, I just wish to be able to place a pointer on the start of the webpage and read.

I have tried libcurl and I just cannot get it to compile and I do not understand enough about networking to use winsock. I would really appreciate some help.

thanks

Will Edwards

Try plain old "Curl" it comes as an .exe file (it still has some learning curve, but you don't have to compile anything).

Go to http://curl.haxx.se/download.html and pickup one of the binary packages.

Also, if you are trying to use C++/CLI, then a reference on .NET's methods for C# would be helpful to you (see http://www.csharp-station.com/HowTo/HttpWebFetch.aspx)

Hey thanks very much,
I am using curl at the moment but I can't even get the source examples to compile, there are so many things which just arent up to date with visual studio 2010 :(
This is what I need to do but I can't get it to compile

http://curl.haxx.se/libcurl/c/fopen.html

No, there's two different things. Libcurl is the library, which understandably probably takes some tweaking to get running. Curl is the executable program that same site puts out as a binary (which their code is probably based on Libcurl). No need to compile or write anything. Sorry it's so confusing, but there's a mixture of binaries and source on that page I gave you.

http://www.paehl.com/open_source/?CURL_7.21.2 is a direct link to a page of someone who has compiled the binaries for Win32. If you feel more comfortable going from the curl site, on the page I gave you scroll down to Win32 Generic and the first 2 links go to url above (make sure they say "binary" in the next column).

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.