BizSolutions

Home Service SMS / MMS SMS / MMS API SMS API - SAMPLE CODE
PDF Print E-mail

1. PHP

pls read our api doc

2. ASP/ASP.NET

pls read our api doc

3. JAVA

http://stackoverflow.com/questions/1485708/how-do-i-do-a-http-get-in-java

import java.io.*;
import java.net.*;

public class c {

public static String getHTML(String urlToRead) throws Exception {
StringBuilder result = new StringBuilder();
URL url = new URL(urlToRead);
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String line;
while ((line = rd.readLine()) != null) {
result.append(line);
}
rd.close();
return result.toString();
}

public static void main(String[] args) throws Exception
{
System.out.println(getHTML(args[0]));
}
}

 

 



[24Hours] Hong Kong: (852)23886700,  Email: 23886700@accessyou.com QQ: 13229966221/2253409437  WhatsAppwhatsapp/LINE+852 98882844, WeChatwechat: 85298882844, Skype: m98882844 Fax: (852)81037227, Web: www.accessyou.com Enquiry Form: Online Enquiry Form | Free Trial | Buy Now

Company: ADVANCED CONNECTION LTD

Head Office: Suite 2208, Tower II, Lippo Centre, 89 Queensway, Admiralty
Support Office: Rm 1118, Asia Trade Centre, 79 Lei Muk Road, Kwai Chung, Hong Kong

payment-all

echeque