I need to send SMS in hindi, for this I need to pass the hindi string through URL.
As I am coading in php I used urlencode($hindimessage)
on string and passed complete URL through file_get_contents()
. On executing I got error:
Warning: file_get_contents(http://IP GOES HERE/smpp/sendsms?username=$name&password=******&to=$contact&from=DEMOTT&coding=3&&text=%E0%A4%AE%E0%A4%A8%E0%A5%80%E0%A4%B7+%E0%A4%95%E0%A5%81%E0%A4): failed to open stream: HTTP request failed! HTTP/1.1 505 HTTP Version Not Supported
Without using urlencode(), the server treats text as EMPTY STRING and rejects.
I also tried Using utf8_encode() encoding. I recive message in HTML tags like ही
....
But when I use the API URL directly I am able to recive the message in hindi since API is Unicode API coding=3 enbled for Hindi text.(i.e API is working Properly)
Please Inform what kind of approach I need to adopt for sending message in both Hindi as well as in English.
Thanks in Advance