Results 1 to 4 of 4

Thread: How to use Winsock to recursively fetch html source from a number of pages

  1. #1

    Thread Starter
    Junior Member
    Join Date
    May 2006
    Posts
    24

    How to use Winsock to recursively fetch html source from a number of pages

    Hi all,

    How can I use Winsock control / API to recursively fetch html source from a number of pages until a certain page contains a certain string in the source and stop there.

    Thanks in advance!

  2. #2
    Frenzied Member
    Join Date
    Oct 2003
    Posts
    1,301

    Re: How to use Winsock to recursively fetch html source from a number of pages

    Winsock will handle the TCP/IP connection.
    You will need to write your own implementation of HTTP to talk to the server.
    When you have retrieved the page you search it for the string you are interested in.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    May 2006
    Posts
    24

    Re: How to use Winsock to recursively fetch html source from a number of pages

    Quote Originally Posted by jeroen79
    Winsock will handle the TCP/IP connection.
    You will need to write your own implementation of HTTP to talk to the server.
    When you have retrieved the page you search it for the string you are interested in.
    Sorry, I don't get you. Can you be a little more specific?

  4. #4
    Frenzied Member
    Join Date
    Oct 2003
    Posts
    1,301

    Re: How to use Winsock to recursively fetch html source from a number of pages

    You make the winsock control setup a TCP connection with the webserver where the files are.

    Then you use that winsock control to send HTTP codes to the server and receive the responses from the server.
    Study the HTTP protocol for this.
    By sending the right codes the server will return the page you want.

    When you have the page on your PC you can search it for the string you are interested in.

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