Guest User

Untitled

a guest
Mar 3rd, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. Runtime rt = Runtime.getRuntime();
  2. String url = String.format("http://www.companysms.com/RemoteAPI/SendSMS.aspx?username=%s&encoding=url&password=%s&messagedata=%s&receiver=%s&binary=0", txtUsername.getText(),txtPassword.getText(), txtMessage.getText(),tblMessage.getValueAt(i, 2));
  3. rt.exec("rundll32 url.dll,FileProtocolHandler "+ url);
  4.  
  5. HttpURLConnection connection = (HttpURLConnection) myURL.openConnection();
  6. connection.setRequestMethod("GET");
  7. connection.setDoOutput(true);
  8. connection.connect();
  9. BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
  10. StringBuilder results = new StringBuilder();
  11. String line;
  12. while ((line = reader.readLine()) != null) {
  13. results.append(line);
  14. }
  15.  
  16. connection.disconnect();
Add Comment
Please, Sign In to add comment