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! :)
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.
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? :(
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.