Java_Nsms_demo/src/com/cn/zhutong/sms/SendSMS.java
(完整代码) 1KBpackage com.cn.zhutong.sms;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import javax.net.ssl.HttpsURLConnection;
import javax.rmi.CORBA.Util;
import com.cn.zhutong.util.HttpRequest;
import com.cn.zhutong.util.MD5Gen;
import com.cn.zhutong.util.TimeUtil;
public class SendSMS {
/**
* @param args
*/
public static void main(String[] args) throws InterruptedException{
String url ="http://www.ztsms.cn/sendNSms.do";
String username ="";//内容
String password ="";//密码
String mobile ="";//号码
String content ="";//内容
String productid ="";//产品id
String xh ="";//没有
String tkey =TimeUtil.getNowTime("yyyyMMddHHmmss");
try{
content=URLEncoder.encode(content,"utf-8");
}catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
String param="url="+url+"&username="+username+"&password="+MD5Gen.getMD5(MD5Gen.getMD5(password)+tkey)+"&tkey="+tkey+"&mobile="+mobile+"&content="+content+"&productid="+productid+"&xh"+xh;
String ret=HttpRequest.sendPost(url, param);//sendPost or sendGet 即get和post方式
System.out.println("ret:"+ret);
System.out.println(param);
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
