【发布时间】:2010-05-04 22:21:46
【问题描述】:
我需要将所有 HTML 文本从像 http://localhost/index.html 这样的 url 读入 C 中的字符串。
我知道如果我输入 telnet -> telnet www.google.com 80 Get webpage.... 它会返回所有的 html。
如何在使用 C 的 linux 环境中执行此操作?
【问题讨论】:
-
你知道多少C?事实上,你说
String variable on C表示不多:/ -
忘记把它放在一个字符串中。你在 Linux 上,所以...
int main(){system("curl http://localhost/index.html");}
标签: c linux http networking