You can send sms with simple GET request you actually don't need much to do
this. (i hate java tbh its bloating)

Either do this with curl / GET or write your own simple client in php/perl.

2012/6/6 <[email protected]>

> I noticed you didnt add charset=utf-8, i suggest you check that out, put
> this line of code and give it a shot.
>
> param.append(URLEncoder.**encode("charset","UTF-8")).**
> append("=").append(URLEncoder.**encode("utf-8","UTF-8"));
>
>
> Quoting Mahtab Rasheed <[email protected]>:
>
>
>> Dear All,
>>            I can successfully send SMS in English. But I want to send it
>> in
>> URDU/Arabic .....
>> I searched google and got hint from this link
>> http://stackoverflow.com/**questions/10194047/sending-**
>> arabic-sms-in-kannel<http://stackoverflow.com/questions/10194047/sending-arabic-sms-in-kannel>
>> here
>>
>> I used this code but I am unable to send sms in URDU/Arabic although my
>> mobile phone supports URDU. I receive rectangles on my mobile phone
>>
>> THis is the code which I have used .......
>>
>> ****************************************************************
>> ****************
>> import java.io.BufferedReader;
>> import java.io.IOException;
>> import java.io.InputStreamReader;
>> import java.io.OutputStreamWriter;
>> import java.io.**UnsupportedEncodingException;
>> import java.net.HttpURLConnection;
>> import java.net.InetSocketAddress;
>> import java.net.**MalformedURLException;
>> import java.net.Proxy;
>> import java.net.URL;
>> import java.net.URLConnection;
>> import java.net.URLEncoder;
>> import java.util.logging.Level;
>> import java.util.logging.Logger;
>> /**
>>  * Main.java
>>  *
>>  * @author www.javadb.com
>>  */
>> public class Main {
>>
>>    /**
>>     * Extends the size of an array.
>>     */
>>    public void sendPostRequest() {
>>
>>       try {
>>
>>
>>            String numTel="03478847037";
>>            String text="??????";
>>
>>
>>            StringBuffer aResult= new StringBuffer();
>>            StringBuffer param = new StringBuffer();
>>
>>
>>            
>> param.append("http://192.168.**214.128:13013/cgi-bin/sendsms<http://192.168.214.128:13013/cgi-bin/sendsms>
>> ?**");
>>
>> param.append(URLEncoder.**encode("username","UTF-8")).**
>> append("=").append(URLEncoder.**encode("tester","UTF-8"));
>>
>> param.append("&").append(**URLEncoder.encode("password","**
>> UTF-8")).append("=").append(**URLEncoder.encode("foobar","**UTF-8"));
>>
>> param.append("&").append(**URLEncoder.encode("to","UTF-8"**
>> )).append("=").append(**URLEncoder.encode(numTel,"UTF-**8"));
>>
>>
>> param.append("&").append(**URLEncoder.encode("coding","**
>> UTF-8")).append("=").append(**URLEncoder.encode("2","UTF-8")**);
>>
>> param.append("&").append(**URLEncoder.encode("text","UTF-**
>> 8")).append("=").append(**URLEncoder.encode(text,"UTF-8"**));
>>
>>
>>           try {
>>
>>
>>                URL url = new URL(param.toString());
>>                   System.out.println("INFO : Opening connection ");
>>                     System.out.println(param.**toString());
>>
>>                   HttpURLConnection urlconnection = (HttpURLConnection)
>> url.openConnection();
>>                   System.out.println("INFO : Connection openned");
>>                   BufferedReader input = new BufferedReader( new
>> InputStreamReader(**urlconnection.getInputStream()**));
>>                   String inputLine;
>>
>>           while ((inputLine = input.readLine()) != null)
>>               aResult.append(inputLine);
>>           //input.close();
>>       }catch(Exception e){
>>           e.printStackTrace();
>>
>>       }
>>
>>       System.out.println("response : "+aResult.toString());
>>       System.out.println("INFO : all sent disconnect.");
>>       }
>>               catch (UnsupportedEncodingException ex)
>>               {
>>            Logger.getLogger(Main.class.**getName()).log(Level.SEVERE,
>> null,
>> ex);
>>        }
>>    }
>>    /**
>>     * Starts the program
>>     *
>>     * @param args the command line arguments
>>     */
>>    public static void main(String[] args) {
>>        new Main().sendPostRequest();
>>    }
>>
>
>
>  }
>> ****************************************************************
>> ****************
>>
>>
>> Please please help me ...................... We are developing a system to
>> SMS to farmers as they cannot understand English but local Language (URDU)
>>
>>
>> Regards,
>>
>> Mahtab Rasheed
>> Pakistan
>> --
>> View this message in context:  http://old.nabble.com/Send-**
>> SMS-in-URDU-Arabic-**tp33968221p33968221.html<http://old.nabble.com/Send-SMS-in-URDU-Arabic-tp33968221p33968221.html>
>> Sent from the Kannel - User mailing list archive at Nabble.com.
>>
>>
>>
>>
>
>
>

Reply via email to