CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2010
    Posts
    1

    Question Open socket and read from web page

    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

  2. #2

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured