首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何在wordpress中以Contact7形式集成sms api

如何在wordpress中以Contact7形式集成sms api
EN

WordPress Development用户
提问于 2020-04-13 16:09:12
回答 1查看 55关注 0票数 0

我接受了http://bulksmsindia.mobi/bulksmsindia/index.html的短信服务。我想整合短信在我的WordPress网站作为确认表格提交。我已经从下面的服务提供商那里得到了,但是我如何整合,请指导。

批量SMS印度开发者API

HTTP API详细信息

发送短信(逗号分开):

代码语言:javascript
复制
http://bulksmsindia.mobi/sendurlcomma.aspx?user=profileid&pwd=password&senderid=ABC&mobileno=9999999989,9999999990,9999999991&msgtext=Hello

代码示例:(发送SMS)

代码语言:javascript
复制
''''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
EN

回答 1

WordPress Development用户

发布于 2020-04-13 19:04:27

将SMS集成到联系人表单7的最佳方法是找到支持电子邮件接口发送SMS的SMS提供者。

然后,只需在配置表单的底部勾选Mail 2,您就可以将消息放入其中。

我以前用Kapow SMS网关做过这件事。

票数 0
EN
页面原文内容由WordPress Development提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://wordpress.stackexchange.com/questions/363954

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档