Joke Collection Website - Blessing messages - How to realize the automatic sending function of short messages with Java?

How to realize the automatic sending function of short messages with Java?

Java mainly uses /submitdata/service. Asmx/g _ submit ") to realize the automatic sending function of short messages;

post . addrequestheader(" Content-Type ",

“application/x-www-form-urlencoded; charset = utf-8 "); //? Set transcoding in the header file

NameValuePair[]? Data? =? {? New? NameValuePair("sname ","*****"),

New? NameValuePair("spwd ","*****"),

New? NameValuePair ("Scorpio", "* * * *"),

New? Name value pair ("sprdid", "* * * *"),

New? NameValuePair("sdst ","*****"),

New? NameValuePair("smsg ","*****")? };

Post.setRequestBody (data);

client . execute method(post);

Header []? Title? =? post . getresponseheaders();

int? statusCode? =? post . getstatuscode();

System.out.println("statusCode:"? +? status code);

For what? (Header? h? :? Title)? {

system . out . println(h . tostring());

}

String? The result? =? New? string(post . getresponsebodyasstring()。 getBytes(" utf-8 "));

System.out.println (result);

post . release connection(); Java source program (. Java file)->; Java bytecode file (. Class file)->; The bytecode file is loaded into the java virtual machine (JVM) by the interpreter (java.exe)->; Byte code file (. Class) will be executed in the java virtual machine.

Java is an object-oriented programming language, which not only absorbs the advantages of C++ language, but also abandons the concepts of multiple inheritance and pointers that are difficult to understand in C++, so Java language has two characteristics: powerful function and simple use. As the representative of static object-oriented programming language, Java language perfectly realizes the object-oriented theory and allows programmers to carry out complex programming in an elegant way of thinking.

Java is characterized by simplicity, object-oriented, distributed, robustness, security, platform independence and portability, multithreading and dynamics? . Java can write desktop applications, Web applications, distributed systems and embedded system applications.