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?
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.
- Previous article:What happens if you don't answer the phone after the deadline?
- Next article:Top ten foreign apps
- Related articles
- Saturday greetings
- What is the function of volte and how to turn it off?
- How to Switch Handwriting Input Method for Apple Mobile Phone
- Draw a sword to help.
- How to take a screenshot of Apple's 5s?
- A copywriting sentence that is super upright and clean about a person’s three views
- The short message shows no theme.
- When roaming internationally, will there be a text message reminder if a personal communication assistant is activated?
- Huainan City’s latest epidemic prevention policy (Huainan City’s latest epidemic prevention policy announcement)
- How does Agricultural Bank of China send SMS to check the balance?