zoukankan      html  css  js  c++  java
  • 查询短信的短信剩余条数

    /**
         * 查询短信的短信剩余条数
         * @return
         */
        public static String getSmsCount() {
            String ret_str = "";
            BufferedReader rd=null;
            try {
                //http://221.179.180.158:9000/QxtSms/QxtFirewall?OperID=test&OperPass=test&SendTime=&ValidTime=&AppendID=1234&DesMobile=13900000000&Content=%D6%D0%CE%C4%B6%CC%D0%C5abc&ContentType=15
               String myurl="http://221.179.180.158:9001/QxtSms/surplus?OperID="+getPropertiesByKey("sms_userId")
               +"&OperPass="+getPropertiesByKey("sms_password");
            /*      String myurl=getPropertiesByKey("sms_get")+"?OperID="+
                  getPropertiesByKey("sms_userId")+"&OperPass="+getPropertiesByKey("sms_password")
                  +"&SendTime=&ValidTime=&AppendID=&DesMobile="+mobile_phone+"&Content="+ URLEncoder.encode(msg, "GBK")+"&ContentType=15";
            */      
             System.out.println(myurl);
              URL url = new URL(myurl);
              URLConnection conn = url.openConnection();
              conn.setDoOutput(true);
            // Get the response
                rd = new BufferedReader(new InputStreamReader(conn.
                  getInputStream()));
              String line;
              while ( (line = rd.readLine()) != null) {
                  ret_str += line;
              }
              System.out.println("条数:"+ret_str);
              rd.close();
            }
            catch (Exception e) {
              System.out.println(e.toString());
            }
            finally{
                try {
                    if(rd!=null)
                      rd.close();
                } catch (IOException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }
            }
            return ret_str;
             
        }

    宝贝网址:

  • 相关阅读:
    进程状态-top,ps
    怎么杀死进程?
    linux文件属性和类型
    文件管理的相关命令
    系统的目录结构
    linux基础_02
    linux基础_01
    python 01
    什么是NoSql
    为何不推荐子查询和join?
  • 原文地址:https://www.cnblogs.com/W203654/p/3772716.html
Copyright © 2011-2022 走看看