程序与网络交互

发布于 2024-12-24 20:41:23 字数 72 浏览 0 评论 0原文

为了使用 C++ 与网络交互,我需要如何或了解什么编程知识。例如,我想编写一个程序,自动向雅虎国际象棋玩家发送邀请。我该怎么做呢?

How or what do I need to know programming wise in order to interact with the web using c++. For instance i want to wrote a program that automatically sends invites to players on yahoo chess. How would i go about doing this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

宛菡 2024-12-31 20:41:23

您需要了解 TCP/IP 和 HTTP(可能还有 UDP)的基础知识,以及雅虎国际象棋系统所涉及的协议,或者拥有一个解决这些协议的工具(简短的搜索使我相信,即使有,也很少)。您可能需要一个网络 API,我建议查看:

其中Qt 易于使用,Asio 更强大,本质上更“C++”。 Qt 有一些不错的 webkit 组件,我用它构建了一个小型 Web 服务器,这很有趣。你可以用它完成很多事情。

页面显示他们添加了验证码系统以防止某些人与其系统交互。我不熟悉雅虎游戏,也不熟悉这对你想做的事情有什么影响,但是这对我来说意味着他们宁愿你不编写代码来与他们的系统交互。

You'll need to understand the basics of TCP/IP and HTTP, possibly UDP, and the protocols involved with Yahoo's chess systems or posses a tool to work around them (A brief search leads me to believe there are few if any). You'll probably need a network API, I'd suggest looking at:

Where Qt is easy to use, Asio is more powerful, and more 'C++' in nature. Qt has some nice webkit components, and I've used it to build a small web server, which was a lot of fun. You can accomplish quite a lot with it.

This page says they've added a captcha system to prevent certain people from interacting with their systems. I'm not familiar with Yahoo games and what the result of this has on what you'd want to do, however it suggests to me they'd rather you didn't write code to interact with their systems.

烟花易冷人易散 2024-12-31 20:41:23

为此,您需要使用网络 API 并使用 PHP/ASP 等服务器端脚本,使用消息队列与 Web 和 C 进行通信。

For this you need to use network APIs and use server side script like PHP/ASP to communicate with the web and C using message queue.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文