Advertisement
Guest User

Three

a guest
Nov 1st, 2014
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.90 KB | None | 0 0
  1. try {
  2.                         String line, text = "";
  3.                         String[] data = new String[12];
  4.                         int array = 0;
  5.                         int jumlah_enter = 0;
  6.  
  7.                         URL url = new URL("http://10.0.144.153/gmlc.php?msisdn=62" + isiPesan.substring(1));
  8.                         BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));
  9.                         while ((line = in.readLine()) != null) {
  10.  
  11.                             String[] pecah1 = line.split("<br/>");
  12.                             for (int i = 0; i < pecah1.length; i++) {
  13.                                 if (jumlah_enter > 0 && jumlah_enter < 12) {
  14.                                     text = text + " : " + pecah1[i];
  15.                                 }
  16.                                 jumlah_enter++;
  17.                             }
  18.                         }
  19.                         in.close();
  20.                         //System.out.println(text);
  21.                         String[] pecah2 = text.split(" : ");
  22.                         for (int i = 0; i < 24; i++) {
  23.                             int sisa = i % 2;
  24.                             if (sisa == 0) {
  25.                                 data[array] = pecah2[i];
  26.                                 array++;
  27.                             }
  28.                         }
  29.                        
  30.                         SMSBalasan = "q";
  31.                         frmServer.KirimSMS(noHp, "MSISDN:" + data[1] + ",\nIMSI:" + data[4] + ",\nMSC:" + data[5] + ",\nTimestamp:" + data[6] + ""
  32.                                 + ",\nMSC:" + data[7] + ",\nMNC:" + data[8] + ",\nLAC:" + data[9] + ""
  33.                                 + ",\nCELL ID:" + data[10] + ",\nFLR NO:" + data[11]);
  34.                         temp = noHp;
  35.                     } catch (MalformedURLException e) {
  36.                     } catch (IOException e) {
  37.                     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement