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;
             
        }

    宝贝网址:

  • 相关阅读:
    C# 7.2 通过 in 和 readonly struct 减少方法值复制提高性能
    .net remoting 使用事件
    .net remoting 使用事件
    WPF 使用 SharpDX 在 D3DImage 显示
    PHP readlink() 函数
    PHP readfile() 函数
    PHP popen() 函数
    PHP pclose() 函数
    PHP pathinfo() 函数
    latin1字符集的数据转换为utf8字符集
  • 原文地址:https://www.cnblogs.com/W203654/p/3772716.html
Copyright © 2011-2022 走看看