Hi,

Try this:
--------------
String result = "";
String data =  "user" + "=" + URLEncoder.encode("test","UTF8")
        + "&" + "pass"  + "=" + URLEncoder.encode("test", "UTF8")
        + "&" + "to"       + "=" + URLEncoder.encode("999", "UTF8")
        + "&" + "text"    + "=" + URLEncoder.encode("test ", "UTF8");
java.net.URL url = new java.net.URL("http://localhost:13013/cgi-bin/sendsms
?"+data);
java.io.InputStream in = url.openStream();
java.io.BufferedInputStream bufIn = new java.io.BufferedInputStream(in);
for (;;) {
                int car = bufIn.read(); // Check for EOF
                if (car == -1) {
                    break;
                } else {
                    result = result + (char) car;
                }
}
bufIn.close();
in.close();
---------------
Hope this help.

Regards
--
Abdulmnem Benaiad
Almontaha CTO
Tripoli-Libya
www.almontaha.ly
about.me <http://about.me/benaiad/bio>



On Sat, Oct 23, 2010 at 9:16 AM, prashant singh
<[email protected]>wrote:

> URL url = new URL("http://localhost:13013/cgi-bin/sendsms?";);
>

Reply via email to