通過驗證碼短信http調(diào)用接口,您可以很快速的在網(wǎng)站或者app中集成手機號驗證功能,該源碼只是核心代碼,具體可以根據(jù)您的實際需求進行擴展。
//------------------------------------------------------------------------------
//
// 此代碼由工具生成。
// 運行時版本:4.0.30319.296
//
// 對此文件的更改可能會導致不正確的行為,并且如果
// 重新生成代碼,這些更改將會丟失。
//
//------------------------------------------------------------------------------
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Serialization;
//
// 此源代碼由 wsdl 自動生成, Version=4.0.30319.1。
//
///
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.1")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Web.Services.WebServiceBindingAttribute(Name = "smsSoap", Namespace = "http://106.ihuyi.com/")]
public partial class sms : System.Web.Services.Protocols.SoapHttpClientProtocol
{
private System.Threading.SendOrPostCallback SubmitOperationCompleted;
///
public sms()
{
this.Url = "http://106.ihuyi.com/webservice/sms.php?smsService";
}
///
public event SubmitCompletedEventHandler SubmitCompleted;
///
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://schemas.xmlsoap.org/Submit", RequestNamespace = "http://106.ihuyi.com/", ResponseNamespace = "http://106.ihuyi.com/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public SubmitResult Submit(string account, string password, string mobile, string content)
{
object[] results = this.Invoke("Submit", new object[] {
account,
password,
mobile,
content});
return ((SubmitResult)(results[0]));
}
///
public System.IAsyncResult BeginSubmit(string account, string password, string mobile, string content, System.AsyncCallback callback, object asyncState)
{
return this.BeginInvoke("Submit", new object[] {
account,
password,
mobile,
content}, callback, asyncState);
}
///
public SubmitResult EndSubmit(System.IAsyncResult asyncResult)
{
object[] results = this.EndInvoke(asyncResult);
return ((SubmitResult)(results[0]));
}
///
public void SubmitAsync(string account, string password, string mobile, string content)
{
this.SubmitAsync(account, password, mobile, content, null);
}
///
public void SubmitAsync(string account, string password, string mobile, string content, object userState)
{
if ((this.SubmitOperationCompleted == null))
{
this.SubmitOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSubmitOperationCompleted);
}
this.InvokeAsync("Submit", new object[] {
account,
password,
mobile,
content}, this.SubmitOperationCompleted, userState);
}
private void OnSubmitOperationCompleted(object arg)
{
if ((this.SubmitCompleted != null))
{
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.SubmitCompleted(this, new SubmitCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
///
public new void CancelAsync(object userState)
{
base.CancelAsync(userState);
}
}
///
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.1")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://106.ihuyi.com/")]
public partial class SubmitResult
{
private int codeField;
private string msgField;
private int smsidField;
///
public int code
{
get
{
return this.codeField;
}
set
{
this.codeField = value;
}
}
///
public string msg
{
get
{
return this.msgField;
}
set
{
this.msgField = value;
}
}
///
public int smsid
{
get
{
return this.smsidField;
}
set
{
this.smsidField = value;
}
}
}
///
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.1")]
public delegate void SubmitCompletedEventHandler(object sender, SubmitCompletedEventArgs e);
///
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.1")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class SubmitCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
{
private object[] results;
internal SubmitCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState)
{
this.results = results;
}
///
public SubmitResult Result
{
get
{
this.RaiseExceptionIfNecessary();
return ((SubmitResult)(this.results[0]));
}
}
}
==================================================================
互億無線驗證碼短信接口下載地址:http://422ajvm.cn/duanxin.html
如有疑問,請聯(lián)系我們的技術(shù),或者訪問我們的網(wǎng)站了解更多信息:http://422ajvm.cn/
開通免費體驗賬戶
在線自助開通互億無線云通信平臺賬戶
免費開通 產(chǎn)品詳情查看短信產(chǎn)品報價
新用戶促銷套餐,首購優(yōu)惠,直接下單購買
驗證碼已發(fā)送到您的手機,請查收!
輸入驗證碼后,點擊“開通體驗賬戶”按鈕可立即開通體驗賬戶。