I'm trying to use an SMS Panel to send my messages online. The format for using their URL Service is like this:
Expand|Select|Wrap|Line Numbers
- http://YourSite.com/post/sendSMS.ashx?from="FromNumber"&to="ToNumber"&text="Message"&password="MyPassword"&username="MyUserName"
Expand|Select|Wrap|Line Numbers
- http://YourSite.com/post/sendSMS.ashx?from=04155157981&to=1000457871&text="Good_not"&password="Good_not"&username=Richard
I have no problem in sending messages that are in English, but this does not work for other languages. If you type the UniCode message in the address bar, it runs successfully, but from within an ASP Classic Page, it sends corrupted message which is not readable.
I tried to use the following code for ASP Classic, but it failed:
Expand|Select|Wrap|Line Numbers
- smsFrom = "04155157981"
- smsTo = "1000457871"
- smsText = "یک متن آزمایشی به زبان فارسی"
- smsPass = "Good_not"
- smsUser = "Richard"
- url = "http://YourSite.com/post/sendSMS.ashx?from=<%=smsFrom%>&to=<%=smsTo%>&text=<%=smsText%>&password=<%=smsPass%>&username=<%=smsUser%>"
- set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")
- xmlhttp.open "GET", url, false
- xmlhttp.send ""
- Response.write xmlhttp.responseText
- set xmlhttp = nothing
Expand|Select|Wrap|Line Numbers
- <%@ codepage=65001 Language=vbScript %>
- <% Response.CharSet = "utf-8" %>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
Does anyone know how to solve this problem?
Any suggestion will be appreciated.