public string sendmessage(string text, string touin) { string result; text = Converts.StrConvUrlEncoding(text, "UTF-8"); string postdate = String.Format("r=%7B%22to%22%3A{0}%2C%22face%22%3A0%2C%22content%22%3A%22%5B%5C%22{1}%5C%22%2C%5B%5C%22font%5C%22%2C%7B%5C%22name%5C%22%3A%5C%22Arial%5C%22%2C%5C%22size%5C%22%3A%5C%2210%5C%22%2C%5C%22style%5C%22%3A%5B0%2C0%2C0%5D%2C%5C%22color%5C%22%3A%5C%22000000%5C%22%7D%5D%5D%22%2C%22msg_id%22%3A{2}%2C%22clientid%22%3A%22{3}%22%2C%22psessionid%22%3A%22{4}%22%7D", touin, text, messagecount++, cliendid, psessionid); result = HttpHelper.GetHtml("http://d.web2.qq.com/channel/send_msg2", postdate, true, cc); return(result); }
public string sendgroupmessage(string text, string touin) { string result; text = Converts.StrConvUrlEncoding(text, "UTF-8"); string groupuin = Main.thefriendlist.QQGroups[touin].gid; string postdate = String.Format("r=%7B%22group_uin%22%3A{0}%2C%22content%22%3A%22%5B%5C%22{1}%5C%22%2C%5B%5C%22font%5C%22%2C%7B%5C%22name%5C%22%3A%5C%22%E5%AE%8B%E4%BD%93%5C%22%2C%5C%22size%5C%22%3A%5C%2210%5C%22%2C%5C%22style%5C%22%3A%5B0%2C0%2C0%5D%2C%5C%22color%5C%22%3A%5C%22000000%5C%22%7D%5D%5D%22%2C%22msg_id%22%3A{2}%2C%22clientid%22%3A%22{3}%22%2C%22psessionid%22%3A%22{4}%22%7D", groupuin, text, messagecount++, cliendid, psessionid); result = HttpHelper.GetHtml("http://d.web2.qq.com/channel/send_group_msg2", postdate, true, cc); return(result); }
public string getlongnick2(string nick) { string result; nick = Converts.StrConvUrlEncoding(nick, "UTF-8"); string postdate = String.Format("r=%7B%22nlk%22%3A%22{0}%22%2C%22vfwebqq%22%3A%22{1}%22%7D", nick, vfwebqq); result = HttpHelper.GetHtml("http://s.web2.qq.com/api/set_long_nick2", postdate, true, cc); if (result.IndexOf("\"result\":0") > 0) { result = "设置签名成功!"; } else { result = "设置签名失败!"; } return(result); }