程序与网络交互
为了使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您需要了解 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.
为此,您需要使用网络 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.