-3

What I exactly want to do is this:

I want my program to take this link http://answers.yahoo.com/dir/index;_ylt=Aj_zP9qxkgoIzbqd5GR_zkH05nNG;_ylv=3?sid=396546041

and retrieve a list of all the questions in a page or any selected page. That part is easy through simply going through the page, but I want to be able to "do" things such as typing an answer in the console or window and post it in the question in that forum. Or be able to upvote/downvote and do most of the operations that require a button click. Save questions for later view and other things like that.

My approach for retrieving info is using C++ to parse the info from the page by going through it line by line. But I have absolutely no clue how to send information such as button pressing and other stuff. I even don't know how to search for it because I'm not sure what it's called.

4

1 回答 1

0
  1. 使用sockets api(windows sockets或linux上的posix);
  2. 在 80(或任何 http)端口上连接到您的服务器;
  3. 发送一个 http-header 和 get/post 参数(应该是 urlencoded);
  4. 收到回复。

关键词:http-protocol,berkeley sockets,c++,祝你好运!

于 2013-07-22T18:49:16.130 回答