how to send sms using asp

0

Sending sms from website using SMS Programming language
its very simple using cannyinfotech sms gateway.

sResponse = SMSSend(pno, message )
If right(sResponse,15) = “Send Successful” Then
‘write your code here
End If

Function SMSSend (strPh,strMsg)

Dim msgResponse
Dim strRequest
Dim strUrl
msgResponse = “”

strPh=right(strPh,10)
If not IsNumeric(strPh) Or len(strPh) <> 10 Then
msgResponse = “Enter valid Mobile Number.”
End If
If strMsg = “” Then
msgResponse = “Enter text message.”
End If

strUrl = “http://www.yourwebiste.com/sendurlcomma.asp?”
strRequest = strRequest+”user=profileid”
strRequest = strRequest+”&pwd=pass”
strRequest = strRequest+”&mobileno=”+strPh
strRequest = strRequest+”&msgtext=”+Server.URLEncode(strMsg)

strUrl = strUrl+strRequest

If msgResponse = “” Then
Dim oXML
Dim sPage
Err.Clear
On Error Resume Next
Set oXML = Server.CreateObject(“Msxml2.XMLHTTP”)
oXML.Open “get”, strUrl , false
oXML.Send
msgResponse = oXML.ResponseText
Set oXML = Nothing
End If

SMSSend = msgResponse

If Err.Number <> 0 Then
SMSSend = “Problem on sending sms : “& Err.Description
End If

End Function

In the above program strurl and strRequest you have to change according to your API given by cannyinfotech for more details email us on sms@cannyinfotech.com


[kml_flashembed publishmethod="static" fversion="8.0.0" useexpressinstall="true" movie="http://www.cannyinfotech.com/smsblog/wp-content/uploads/2010/03/SMSGlobal.swf" width="300" height="250" targetclass="flashmovie" play="true" loop="true" quality="best" allowscriptaccess="always"]

Get Adobe Flash player

[/kml_flashembed]

Leave a Reply

Proudly designed by BULK SMS Gateway.