Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Runtime rt = Runtime.getRuntime();
- 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));
- rt.exec("rundll32 url.dll,FileProtocolHandler "+ url);
- HttpURLConnection connection = (HttpURLConnection) myURL.openConnection();
- connection.setRequestMethod("GET");
- connection.setDoOutput(true);
- connection.connect();
- BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
- StringBuilder results = new StringBuilder();
- String line;
- while ((line = reader.readLine()) != null) {
- results.append(line);
- }
- connection.disconnect();
Add Comment
Please, Sign In to add comment