November 10th, 2010, 06:04 AM
Open socket and read from web page
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.
November 14th, 2010, 07:31 PM
Re: Open socket and read from web page
Hi, I've just been looking at this myself, and came across your question. CInternetSession seems to be the class to use. It looks like it will handle all the sockets and HTTP level coding, and then you can read the HTML format content of the page just like a CStdioFile file.
I'm still sorting out the details myself, but search for some sample code using CInternetSession, and that should provide a good start.
Click Here to Expand Forum to Full Width
This a Codeguru.com survey!