我接受了来自http://bulksmsindia.mobi/bulksmsindia/index.html. 我想在我的WordPress网站中集成短信作为确认表单提交。我从下面的服务提供商那里得到了一些信息,但如何集成请指导。
批量SMS印度开发人员API
HTTP API详细信息
发送短信(逗号分隔):
http://bulksmsindia.mobi/sendurlcomma.aspx?user=profileid&pwd=password&senderid=ABC&mobileno=9999999989,9999999990,9999999991&msgtext=Hello
代码示例:(发送短信)
\'\'\'\'write code for loop while (you can open record set here)
sResponse = ""
sResponse = SMSSend(pno, message )
If right(sResponse,15) = "Send Successful" Then
\'write your code here
End If
\'\'\'End Wend
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://bulksmsindia.mobi/sendurlcomma.asp?"
strRequest = strRequest+"&user=profileid"
strRequest = strRequest+"&pwd=pass"
strRequest = strRequest+"&senderid=senderid"
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