Read HTML source to string

后端 未结 4 1442
臣服心动
臣服心动 2021-02-06 16:22

I hope you don\'t frown on me too much, but this should be answerable by someone fairly easily. I want to read a file on a website into a string, so I can extract information fr

4条回答
  •  长情又很酷
    2021-02-06 17:12

    HTTP is built on top of TCP. If you know socket programming, you can write a simple networking application that opens a socket to the desired server and issues an HTTP GET command. Whatever the server responds with, you'll have to remove the HTTP headers that precede the actual document you want.

    If that sounds complicated, then just stick with libcurl.

提交回复
热议问题