我喜欢黑夜,喜欢网络安全,孤独寂寞的黑夜里,我只需要,一包烟,一台笔记本...
更多
首  页>>JAVA安全开发>> JAVA安全开发新版JavaQQ机器人,基于WebQQ HTTP协议实现,供学习交流使用
新版JavaQQ机器人,基于WebQQ HTTP协议实现,供学习交流使用
15611
2推荐
4评论

新版Java QQ机器人,可以智能对答,讲笑话

1万多条智能对答数据,2万多条笑话

mysql+eclipse


TestWebQQ.rar


这里只提供源码包,需要数据库的请联系我,QQ:1341413415。


核心代码:


package com.my.util;
 
import java.io.BufferedReader;
import java.io.ByteArrayOutputStream;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLEncoder;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;
import java.util.Map;
import java.util.Random;
import java.util.Set;
import java.util.Map.Entry;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.zip.GZIPInputStream;
 
import com.my.dao.MsgDao;
import com.my.model.Msg;
import com.my.service.MsgService;
 
import atg.taglib.json.util.JSONArray;
import atg.taglib.json.util.JSONException;
import atg.taglib.json.util.JSONObject;
 
//本工程需要一个json-taglib包
//下载地址:http://sourceforge.net/projects/json-taglib/files/latest/download
 
 
public class MsgManage {
 
    private String qq;
    private String password;
 
    private int msg_id = rd.nextInt(1000) + 90000000;
 
    public int getMsg_id() {
        this.msg_id = msg_id + 1;
        return msg_id;
    }
 
    public String psessionid = "";
    private String ptwebqq;
    private String vfwebqq;
    private String skey = "";
 
    public final String host = "http://d.web2.qq.com";
 
    public final String shost = "http://s.web2.qq.com";
 
    private String refer = this.host + "/proxy.html?v=20110331002&callback=2";
 
    private String cookie = "";
    private PollMessageThread poll = new PollMessageThread(this);
    public static Random rd = new Random();
    public int clientid = rd.nextInt(100000000);
    private Map firends = new HashMap();
 
    public boolean run = false;
 
    public Thread getPoolThread() {
 
        return poll;
 
    }
 
    public MsgManage(String qq, String password) {
 
        this.qq = qq;
        this.password = password;
 
    }
 
    private MsgService ms = new MsgService();
 
    private MsgDao md = new MsgDao();
 
    /**
     * 生成随机码
     * 
     * */
    public String getRandomCode() {
 
        return rd.nextDouble() + "";
 
    }
 
    public Map info = new HashMap();
 
    /**
     * 登陆
     * 
     * */
    public boolean login() {
        // login 1
        String checkQQUrl = "http://check.ptlogin2.qq.com/check?appid=1003903&uin="
                + qq + "&r=" + getRandomCode();
        System.out.println(checkQQUrl);
        String result = sendHttpMessage(checkQQUrl, Method.GET.name(), null);
        Pattern p = Pattern.compile("\,\'([!\w]+)\'");
        Matcher m = p.matcher(result);
        String checkType = "";
        String uinstr = "\x00\x00\x00\x00\x6d\x4c\x4e\x1c";
        if (m.find()) {
            checkType = m.group(1);
        }
 
        Pattern p_uin = Pattern
                .compile("\\\w{3}\\\w{3}\\\w{3}\\\w{3}\\\w{3}\\\w{3}\\\w{3}\\\w{3}");
        m = p_uin.matcher(result);
        if (m.find()) {
            uinstr = m.group(0);
        } else {
            log("error:取uin编码失败,请检查。。。");
        }
        String check = "";
        if (!checkType.startsWith("!")) {
            // 生成图片验证码
 
            String imagePath = "http://captcha.qq.com/getimage?aid=1003903&uin="
                    + this.qq + "&r=" + getRandomCode();
 
            try {
                URL url = new URL(imagePath);
 
                //此为联系获得网络资源的固定格式用法,以便后面的in变量获得url截取网络资源的输入流
                HttpURLConnection conn = (HttpURLConnection) url
                        .openConnection();
 
                // 这里取出验证码图片记得加入cookie,否则,提交验证码会无效
                if (conn.getHeaderFields().get("Set-Cookie") != null) {
 
                    for (String s : conn.getHeaderFields().get("Set-Cookie")) {
                        cookie += s;
                    }
 
                }
 
                DataInputStream in = new DataInputStream(conn.getInputStream());
 
                // 此处也可用BufferedInputStream与BufferedOutputStream 
                DataOutputStream out = new DataOutputStream(
                        new FileOutputStream("d://a.jpg"));
 
                // 将参数savePath,即将截取的图片的存储在本地地址赋值给out输出流所指定的地址
                byte[] buffer = new byte[1024];
                int count = 0;
 
                //将输入流以字节的形式读取并写入buffer中
                while ((count = in.read(buffer)) > 0) {
                    out.write(buffer, 0, count);
                }
                // 关闭输入输出流
                out.close();
                in.close();
                conn.disconnect();
 
                System.out.println("请输入验证码");
                BufferedReader br = new BufferedReader(new InputStreamReader(
                        System.in));
                String code = br.readLine();
 
                check = code.toUpperCase();
 
            } catch (Exception e) {
                e.printStackTrace();
            }
        } else {
            check = checkType;
        }
 
        // login 2
        MD5 md5 = new MD5();
        String loginUrl = "http://ptlogin2.qq.com/login?u="
                + this.qq
                + "&p="
                + encodePass(this.password, uinstr, check)
                + "&verifycode="
                + check
                + "&webqq_type=10&remember_uin=1&login2qq=0&aid=1003903&u1=http%3A%2F%2Fweb2.qq.com%2Floginproxy.html%3Flogin2qq%3D1%26webqq_type%3D10&h=1&ptredirect=0&ptlang=2052&from_ui=1&pttype=1&dumy=&fp=loginerroralert&action=2-16-24403&mibao_css=m_webqq&t=1&g=1";
        result = sendHttpMessage(loginUrl, Method.GET.name(), null);
        p = Pattern.compile("登录成功!");
        m = p.matcher(result);
        if (m.find()) {
            log("Welcome QQ : " + this.qq + " Login Success!");
        } else {
            log(checkType);
            return false;
        }
 
        // 从cookie中提取ptwebqq,skey
        p = Pattern.compile("ptwebqq=(\w+);");
        m = p.matcher(cookie);
        if (m.find()) {
            this.ptwebqq = m.group(1);
        }
 
        p = Pattern.compile("skey=(@\w+);");
        m = p.matcher(cookie);
        if (m.find()) {
            this.skey = m.group(1);
        }
        // log("ptwebqq="+ptwebqq+",skey="+skey);
 
        // login 3
        String channelLoginUrl = this.host + "/channel/login2";
        String content = "{"status":"","ptwebqq":"" + ptwebqq
                + "","passwd_sig":"","clientid":"" + clientid + ""}";
        try {
            content = URLEncoder.encode(content, "UTF-8");
        } catch (Exception e) {
            e.printStackTrace();
        }
        content = "r=" + content; // post的数据
        result = sendHttpMessage(channelLoginUrl, Method.POST.name(), content);
 
        p = Pattern.compile(""vfwebqq":"(\w+)"");
        m = p.matcher(result);
        if (m.find()) {
            this.vfwebqq = m.group(1);
        }
 
        p = Pattern.compile(""psessionid":"(\w+)"");
        m = p.matcher(result);
        if (m.find()) {
            psessionid = m.group(1);
        }
        log("vfwebqq=" + vfwebqq);
 
        log("psessionid=" + psessionid);
 
        return true;
    }
 
    // 登陆成功 获取QQ好友
    public void getAllFriends() {
        // 得到所有好友的url
        String getFriendsurl = this.shost + "/api/get_user_friends2";
 
        // 得到群列表
        String groups = this.shost + "/api/get_group_name_list_mask2";
        // 得到所有的好友json
        String result = getAllFriends(getFriendsurl);
 
        // 得到所有群json
        String frs = getAllGroups(groups);
 
        // firends
        Map user = getFriendInfo(result);
        log("所有好友:
");
        if (user != null && user.size() > 0) {
            Set> set = user.entrySet();
            for (Iterator> it = set.iterator(); it
                    .hasNext();) {
                Entry e = it.next();
                User u = e.getValue();
                log("QQ:" + u.getQq() + "	" + "呢称:" + u.getNick());
                firends.put(u.getQq() + "", u);
            }
        }
    }
 
    // 在线用户
    public void getAllOnlineFriends() {
 
        String onlineUserURL = host + "/channel/get_online_buddies2";
        onlineUserURL = onlineUserURL + "?clientid=" + clientid
                + "&psessionid=" + psessionid;
        String result = sendHttpMessage(onlineUserURL, Method.GET.name(), null);
        log("在线用户:
" + result);
 
    }
 
    /**
     * 
     * 将json格式数据转换成用户对象
     * 
     * */
    public Map getFriendInfo(String result) {
        Map users = new HashMap();
        try {
            JSONObject retJson = new JSONObject(result);
            if (retJson.getInt("retcode") == 0) {
                JSONArray friends = retJson.getJSONObject("result")
                        .getJSONArray("friends");// 好友列表
                JSONArray info = retJson.getJSONObject("result").getJSONArray(
                        "info");// 其他信息
                // 设置好友
                if (friends != null) {
                    for (ListIteratorit = friends.listIterator(); it
                            .hasNext();) {
                        JSONObject obj = it.next();
                        User user = new User();
 
                        String qq = downQQbyUin(obj.getString("uin"));
                        user.setFlag(obj.getLong("flag"));
                        user.setUin(obj.getString("uin"));
                        user.setCategories(obj.getInt("categories"));
                        user.setQq(qq);
                        users.put(qq + "", user);
                        // 取得好友信息
                        String getMyFriend = this.shost
                                + "/api/get_friend_info2?tuin=" + user.getUin()
                                + "&vfwebqq=" + this.vfwebqq
                                + "&t=1334830753724";
                        String ss = "http://s.web2.qq.com/api/get_single_long_nick2?tuin="
                                + user.getUin()
                                + "&vfwebqq="
                                + this.vfwebqq
                                + "&t=1334830753724";
 
                        String friend = sendHttpMessage(getMyFriend,
                                Method.GET.name(), null);
                        String nikes = sendHttpMessage(ss, Method.GET.name(),
                                null);
                        System.out.println("--->>>:" + friend);
                        System.out.println("--->>>:" + nikes);
 
                    }
                }
                if (info != null) {
                    // 设置其他信息
                    for (ListIteratorit = info.listIterator(); it
                            .hasNext();) {
                        JSONObject obj = it.next();
                        // 根据uin的得到QQ号
                        String qq = downQQbyUin(obj.getString("uin"));
                        User user = users.get(qq);
                        // 设置呢称
                        user.setNick(obj.getString("nick"));
                    }
                }
 
            }
 
        } catch (Exception e) {
            log("getFriendInfo failure  " + e.getMessage());
        }
        return users;
    }
 
    /**
     * 
     * 根据QQ号码的到加密的uin,发送消息都必须使用uin
     * 
     * 
     * */
    public String getFriendUinByQQ(long qq) {
        try {
 
            return this.firends.get(qq + "").getUin();
 
        } catch (Exception e) {
            log("没有找到QQ对应的uin号,可能是好友列表还在加载中....");
        }
 
        return "";
 
    }
 
    /**
     * 
     * 得到所有好友列表json数据
     * 
     * */
    public String getAllFriends(String getFriendsurl) {
 
        // {"h":"hello","vfwebqq":"7fe84931db23dc5a0351d759905642bcf5d09632e001bbfc8822809067538431d4da9dd1e8e653a0"}
        String content = "{"h":"hello","vfwebqq":"" + vfwebqq + ""}";
        try {
            content = URLEncoder.encode(content, "UTF-8");
            content = "r=" + content;
            String result = sendHttpMessage(getFriendsurl, Method.POST.name(),
                    content);
            // log("AllFriends= "+result);
            return result;
        } catch (Exception e) {
            log("fetchAllFriends failed.............	" + e.getMessage());
            return "";
        }
    }
 
    public String getQQbyUin(String uin) {
 
        Iteratoriter = this.firends.keySet().iterator();
 
        while (iter.hasNext()) {
 
            String key = iter.next();
            if (uin.equals(firends.get(key).getUin())) {
                return firends.get(key).getQq() + "";
            }
 
        }
 
        return "";
 
    }
 
    /**
     * 
     * 重网络上根据uin(加密的QQ号码)得到真实的QQ号码
     * 
     * */
    public String downQQbyUin(String uin) {
        try {
            String qurl = this.shost + "/api/get_friend_uin2?tuin=" + uin
                    + "&verifysession=&type=1&code=&vfwebqq=" + this.vfwebqq
                    + "&t=1334893936408";
 
            String result = sendHttpMessage(qurl, Method.GET.name(), null);
 
            JSONObject retJson = new JSONObject(result);
 
            // 得到json数组
            JSONObject user = retJson.getJSONObject("result");// 好友列表
            return user.getString("account");
 
        } catch (JSONException e) {
 
            e.printStackTrace();
        }
        return "";
    }
 
    /**
     * 得到所有群列表json数据
     * 
     * */
    public String getAllGroups(String groupurl) {
        // {"h":"hello","vfwebqq":"7fe84931db23dc5a0351d759905642bcf5d09632e001bbfc8822809067538431d4da9dd1e8e653a0"}
        String content = "{"h":"hello","vfwebqq":"" + this.vfwebqq
                + ""}";
        try {
            content = URLEncoder.encode(content, "UTF-8");
            content = "r=" + content;
            String result = sendHttpMessage(groupurl, Method.POST.name(),
                    content);
            log("AllGroups:
 " + result);
            return result;
        } catch (Exception e) {
            log("getAllGroups failure.............	" + e.getMessage());
            return "";
        }
 
    }
 
    /**
     * 
     * 发送消息
     * 
     * @param to_uin
     *            用户QQ加密后的编号
     * @param message
     *            消息
     * @param groupMsg
     *            是否发送群消息
     * 
     * 
     * */
    public boolean sendMsg(String to_uin, String message, String msgType) {
 
        try {
            if ("".equals(to_uin)) {
                // 账号空
                log("没有找到用户对话账号...");
                return false;
            }
 
            String sendMsgUrl = this.host + "/channel/send_buddy_msg2";
 
            JSONObject json = new JSONObject();
 
            // 发送群消息
            if ("group_message".equals(msgType)) {
                sendMsgUrl = this.host + "/channel/send_qun_msg2";
                json.put("group_uin", to_uin);// 要发送的群
            }
            // channel/send_discu_msg2
            else if ("discu_message".equals(msgType)) {
                sendMsgUrl = this.host + "/channel/send_discu_msg2";
                json.put("did", to_uin);// 要发送的讨论组
            }
 
            // 发送好友消息
            else {
                json.put("to", to_uin);// 要发送的人
            }
 
            // 设置样式
            json.put("face", 330);
 
            JSONArray msg = new JSONArray();
            msg.add(message);
            JSONArray font = new JSONArray();
            font.add("font");
 
            JSONObject font1 = new JSONObject().put("name", "微软雅黑").put("size",
                    "12");
 
            JSONArray style = new JSONArray();
            style.add(0);
            style.add(0);
            style.add(0);
            font1.put("style", style);
            font1.put("color", "000000");
 
            font.add(font1);
            msg.add(font);
 
            json.put("content", msg.toString());
            json.put("msg_id", getMsg_id() + "");
            json.put("clientid", this.clientid);
            json.put("psessionid", this.psessionid);// 需要这个才能发送
 
            // 编码url
            String content = "r=" + URLEncoder.encode(json.toString(), "UTF-8");
 
            // 发送
            String res = sendHttpMessage(sendMsgUrl, Method.POST.name(),
                    content);
 
            // 不出意外,这是返回结果:{"retcode":0,"result":"ok"}
            if (null == res || !res.contains("result")) {
                // 发送失败
                log("send message to " + to_uin + " failure......
");
                return false;
            }
 
            JSONObject rh = new JSONObject(res);
 
            if ("ok".equals(rh.getString("result"))) {
                // 发送成功
                log("send message[msg_id:" + this.msg_id + "] to uin " + to_uin
                        + " ok......
");
                return true;
            }
        } catch (Exception e) {
            log("send message to uin " + to_uin + " failure......
"
                    + e.getMessage());
        }
        log("send message[msg_id:" + this.msg_id + "] to uin " + to_uin
                + " failure......
");
        return false;
 
    }
 
    // HTTP 消息发送
    public String sendHttpMessage(String url, String method, String contents) {
        try {
            log("request=" + url);
            URL serverUrl = new URL(url);
            HttpURLConnection conn = (HttpURLConnection) serverUrl
                    .openConnection();
            conn.setConnectTimeout(20000);
 
            conn.setRequestMethod(method);// "POST" ,"GET"
            if (null != refer)
                conn.addRequestProperty("Referer", refer);
            conn.addRequestProperty("Accept", "*/*");
            conn.addRequestProperty("Cookie", cookie);
            conn.addRequestProperty("Accept-Language", "zh-cn");
            conn.addRequestProperty("Accept-Encoding", "gzip, deflate");
            conn.addRequestProperty("Cache-Control", "no-cache");
            conn.addRequestProperty("Accept-Charset", "UTF-8;");
            conn.addRequestProperty(
                    "User-Agent",
                    "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 1.1.4322; .NET4.0C; .NET4.0E)");
            if (method.equalsIgnoreCase(Method.GET.name())) {
                conn.connect();
            }
 
            else if (method.equalsIgnoreCase(Method.POST.name())) {
 
                conn.setDoOutput(true);
                conn.connect();
                conn.getOutputStream().write(contents.getBytes());
            } else {
                throw new RuntimeException("your method is not implement");
            }
 
            if (conn.getHeaderFields().get("Set-Cookie") != null) {
                for (String s : conn.getHeaderFields().get("Set-Cookie")) {
                    cookie += s;
                }
            }
 
            InputStream ins = conn.getInputStream();
 
            // 处理GZIP压缩的
            if (null != conn.getHeaderField("Content-Encoding")
                    && conn.getHeaderField("Content-Encoding").equals("gzip")) {
                byte[] b = null;
                GZIPInputStream gzip = new GZIPInputStream(ins);
                byte[] buf = new byte[1024];
                int num = -1;
                ByteArrayOutputStream baos = new ByteArrayOutputStream();
                while ((num = gzip.read(buf, 0, buf.length)) != -1) {
                    baos.write(buf, 0, num);
                }
                b = baos.toByteArray();
                baos.flush();
                baos.close();
                gzip.close();
                ins.close();
                return new String(b, "UTF-8").trim();
            }
 
            String charset = "UTF-8";
            InputStreamReader inr = new InputStreamReader(ins, charset);
            BufferedReader br = new BufferedReader(inr);
 
            String line = "";
            StringBuffer sb = new StringBuffer();
            do {
                sb.append(line);
                line = br.readLine();
            } while (line != null);
            log("response=" + sb);
            return sb.toString();
        } catch (Exception e) {
            e.printStackTrace();
            log("message:
消息发送异常!");
            return "";
        }
 
    }
 
    // 加密密码
    public String encodePass(String pass, String uin, String check) {
        try {
            return MD5.encodePass(pass, uin, check);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return "";
    }
 
    // 记录日志
    private void log(String msg) {
        System.out.println(new SimpleDateFormat("yyyy-MM-dd hh:mm:ss")
                .format(new Date()) + " : " + msg);
    }
 
    public String numToIp(Long num) {
        String aaa = Long.toHexString(num);
        String n1 = Integer.parseInt(aaa.substring(0, 2), 16) + "";
        String n2 = Integer.parseInt(aaa.substring(2, 4), 16) + "";
        String n3 = Integer.parseInt(aaa.substring(4, 6), 16) + "";
        String n4 = Integer.parseInt(aaa.substring(6), 16) + "";
 
        return n1 + "." + n2 + "." + n3 + "." + n4;
    }
 
    // 是否继续发言
    boolean goon = true;
 
    // 讲笑话线程
    JokeThread jt;
 
    public void receiveMsg(JSONObject value, String msgType) throws Exception {
        // 收到消息,恢复,用到了mysql数据库,可注释
        String content = value.getJSONArray("content").getString(1).trim();
 
        String from_uin = value.getString("from_uin");
        if ("discu_message".equals(msgType)) {
            from_uin = value.getString("did");
        }
 
        if (content.equals("#help")) {
            sendMsg(from_uin + "", info.get(content) + "", msgType);
        } else {
 
            if (content.trim().equals("out")) {
                goon = false;
                if (jt != null) {
                    jt.stop();
                }
                Thread.sleep(1000);
                sendMsg(from_uin + "", "知道啦,我不说了,别叫我out吗!", msgType);
            }
            if (content.trim().equals("come")) {
                goon = true;
                Thread.sleep(1000);
                sendMsg(from_uin + "", "come,come,I'm coming....", msgType);
            }
 
            if (goon) {
                if ("group_message".equals(msgType)) {
                    Thread.sleep(rd.nextInt(5000) + 500);
                }
 
                // 执行命令
                if (content.startsWith("#")) {
                    // 讲笑话的4个控制命令
                    if (content.startsWith("#joke:")) {
                        if (content.equals("#joke:start")) {
                            if (jt == null) {
                                jt = new JokeThread(this, from_uin, msgType);
                                jt.speak = true;
                                jt.start();
                            }
                        }
                        if (content.equals("#joke:stop")) {
                            if (jt != null) {
                                jt.stop();
                            }
                        }
                        if (content.equals("#joke:quick")) {
                            if (jt != null) {
                                if (jt.sleep > 23) {
                                    jt.sleep = jt.sleep - 3;
                                    sendMsg(from_uin, "现在间隔:" + jt.sleep,
                                            msgType);
                                } else {
                                    sendMsg(from_uin, "现在间隔:" + jt.sleep
                                            + "-小朋友不许干坏事。。", msgType);
                                }
                            }
                        }
                        if (content.equals("#joke:slow")) {
                            if (jt != null) {
                                if (jt.sleep < 60) {
                                    jt.sleep = jt.sleep + 3;
                                    sendMsg(from_uin, "现在间隔:" + jt.sleep,
                                            msgType);
                                }
                            }
                        }
                    }
 
                    String message = ms.executeCmd(content);
                    Thread.sleep(500);
                    if (message.equals("") == false) {
                        sendMsg(from_uin + "", message, msgType);
                    }
                } else {
 
                    try {
                        Listlist = md.getMsgs(content);
                        if (list != null && list.size() > 0) {
                            sendMsg(from_uin + "", list.get(0).getAnswer(),
                                    msgType);
                        } else {
                            // sendMsg(from_uin+"",
                            // "拒绝回答你的这个无聊问题,教我说话命令:#add:问题##答案
给你们讲个笑话吧
"+ms.randSpeakAJoke(),
                            // msgType);
                        }
                    } catch (Exception e) {
 
                    }
                    // sendMsg(from_uin+"", rd.nextDouble()+"
无聊啊,谢谢!",
                    // msgType);
 
                }
            }
 
        }
 
        // //转发消息
        // if(group == false) {
        // String qq = getQQbyUin(from_uin);
        // User u = firends.get(qq);
        // sendMsg(getFriendUinByQQ(1341413415), "[qq = " + qq +
        // "] send message  :
" + content, false);
        // }
        // if(group){
        // log("receive [uin = " + from_uin + "] message {" + content +
        // "}  ~~~");
        // }
        // else{
        // log("receive [uin = " + getQQbyUin(from_uin) + "] message {" +
        // content + "}  ~~~");
        // }
 
    }
 
    public void changeStatus(JSONObject value) throws Exception {
        long from_uin = value.getLong("uin");
        String status = value.getString("status");
        User u = firends.get(from_uin);
        log("用户:" + u.getNick() + "	" + status);
    }
 
}



已经有 ( 4 ) 位网友对此发表了自己的看法,你也评一评吧! 此文不错,我要推荐-->    推 荐
  • 4楼 shack2 发表于:2014-05-15 10:40:11.0        回复
    腾讯接口改了,请自行抓包修改
  • 3楼 wstone 发表于:2014-05-12 12:58:22.0        回复
    新版的协议这个没法登录了 不知道为什么 楼主求解
  • 2楼 shack2 发表于:2013-05-30 14:24:28.0        回复
    腾讯估计有个垃圾消息机制,第一次登陆后5分钟左右才能发送消息,同一消息快速发送多次好像也不行
  • 1楼 膜拜 发表于:2013-05-29 15:02:06.0        回复
    楼主好,看了你这个,确实不错,但是有时候会有发送消息收不到的情况,但控制台,却打印出了 send 。。。。ok ,但是QQ上却没有收到消息,不知道这个是什么问题啊
欢迎参与讨论,请在这里发表您的看法、交流您的观点@禁止各种脚本

  • 点击Top
  • 推荐Top
  • 评论Top
更 多>>
本站采用Java语言开发,Spring框架,欢迎朋友们提意见。重新对页面进行布局,修改了程序,方便开源使用,由于本人美工真的不行 ,很少用背景图片,页面基本都用背景色...
主题:无色无味 | 网站地图|
Copyright (c) 2012-2013 www.shack2.org All Rights Reserved. | 空ICP备111111111号 | 程序设计: shack2 Powered by SJBlog v1.0 联系QQ:1341413415