How to send sms
using visual basic code.
1. : if my mobile is connected via usb.
2.: other method via internet like yahoo messanger and rediffbol
Plese guide me.
Thanks in advance
Adarsh Patel
Printable View
How to send sms
using visual basic code.
1. : if my mobile is connected via usb.
2.: other method via internet like yahoo messanger and rediffbol
Plese guide me.
Thanks in advance
Adarsh Patel
Here are a number of threads on this subject. :)
We use a web service provided by this company
www.24x.com
HTH
Thanks MondeoST24
i show the site.
but i want to develop the software in vb6 or vb.net
if you have any suggestion plz help me
Thanks,
Adarsh Patel
Don't most cell phone numbers have an email address associated with them depending on there network provider?
You can sign up for a free account with 24x. Then use the following codeQuote:
Originally Posted by compad
Code:Public Class smsmessage
Public Shared Function URLEncode(ByVal strData As String)
Dim I, strTemp, strChar, strOut, intAsc
strTemp = Trim(strData)
For I = 1 To Len(strTemp)
strChar = Mid(strTemp, I, 1)
intAsc = Asc(strChar)
If (intAsc >= 48 And intAsc <= 57) Or _
(intAsc >= 97 And intAsc <= 122) Or _
(intAsc >= 65 And intAsc <= 90) Then
strOut = strOut & strChar
Else
strOut = strOut & "%" & Hex(intAsc)
End If
Next
URLEncode = strOut
End Function
Public Shared Function SendMessage(ByVal strUsername As String, ByVal strPassword As String, ByVal strSMSTo As String, ByVal strSMSFrom As String, ByVal strSMSMsg As String) As String
Dim xmlhttp, sResponse
strUsername = URLEncode(strUsername)
strPassword = URLEncode(strPassword)
strSMSTo = URLEncode(strSMSTo)
strSMSFrom = URLEncode(strSMSFrom)
strSMSMsg = URLEncode(strSMSMsg)
xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")
xmlhttp.open("POST", "http://www.24x.com/sendsms/sendsms.aspx", False)
xmlhttp.setrequestheader("Content-Type", "application/x-www-form-urlencoded")
xmlhttp.send("user=" & strUsername & "&password=" & strPassword & "&smsto=" & strSMSTo & "&smsfrom=" & strSMSFrom & "&smsmsg=" & strSMSMsg)
sResponse = xmlhttp.responsetext
xmlhttp = Nothing
SendMessage = sResponse
End Function
End Class
Dear MondeoST24,
Thanks for your help.
but i want to make use all possible ways, so plz guide me if i can send sms using mobile connected to my pc.
Thanks,
Adarsh Patel
As Hack said, there are a number of threads on the subject. No one is going to write code for you that's already posted on the site - you're going to have to look for it.
What make of mobile phone are you using? What you're trying to do may depend on the existance of an SDK from the phone manufacturer.
Recently i have developed hyper terminal program
and whenever i am searching help for my hyper terminal code, i found code which can connect phone and hyperterminal program,
so i thought that with using my hyper terminal program can i use to send message to mobile, i am also searchig this right now....
if i found will also post the code...
Thanks,
Adarsh Patel