VB.NET
'呼叫發送短信,NoList接收號碼.多個之間用,分開,Memo內容70字
Public Function SendSMS(ByVal NoList As String, ByVal Memo As String) As String
Dim Url As String = "http://sms.webchinese.cn/web_api/?Uid=賬號&Key=介面密鑰&smsMob=手機號碼&smsText=短信內容"
Dim webClient As New Net.WebClient()
Try
'Dim responseData As Byte() =
Dim srcString As String = webClient.DownloadString(Url)
Return srcString
Catch
Return "-444"
End Try
End Function
------------------------------------
uj5u.com熱心網友回復:
從代碼看,是HTTP訪問吧,用XMLHTTP.get就可以了啊,你搜一下論壇中的XMLHTTP就有答案了uj5u.com熱心網友回復:
你們是一個人?http://bbs.csdn.net/topics/390702595
Din xmlHttp As Object
Dim param As String
Set xmlHttp = CreateObject("Microsoft.XMLHTTP")
xmlHttp.open "GET", "http://sms.webchinese.cn/web_api/?Uid=賬號&Key=介面密鑰&smsMob=手機號碼&smsText=短信內容", True
xmlHttp.send (Null)
While xmlHttp.ReadyState <> 4
DoEvents
Wend
Dim s As String
s = xmlHttp.responseText
MsgBox s
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/129672.html
標籤:API
上一篇:我再也不想用VB了。我被害慘了。
下一篇:為什么在win32 application里面老是出現 Cannot open precompiled header file: 'Debug/地雷1.pch'
