Send SMS vis SMS Gateway using Java
Copy this code and paste it in your HTML
try
{
String MATRIXURL
= "http://www.smsmatrix.com/matrix"; String PASSWORD
= "pass72727"; String TXT
= "This is a test, pls ignore";
q
+= "&" + "password=" + URLEncoder.
encode (PASSWORD,
"UTF-8"); q += "&" + "phone=" + PHONE;
q
+= "&" + "txt=" + URLEncoder.
encode (TXT,
"UTF-8");
URL url
= new URL (MATRIXURL
); conn.setDoOutput (true);
wr.write (q);
wr.flush();
System.
out.
println ("Matrix API Response :"); while ((line
= rd.
readLine()) != null) { System.
out.
println (line
); } wr.close();
rd.close();
URL: http://www.smsmatrix.com/?sms-gateway
Report this snippet
Comments
Subscribe to comments