通過驗(yàn)證碼短信http調(diào)用接口,您可以很快速的在網(wǎng)站或者app中集成手機(jī)號(hào)驗(yàn)證功能,該源碼只是核心代碼,具體可以根據(jù)您的實(shí)際需求進(jìn)行擴(kuò)展。
//------------------------------------------------------------------------------
//
// 此代碼由工具生成。
// 運(yùn)行時(shí)版本:4.0.30319.296
//
// 對(duì)此文件的更改可能會(huì)導(dǎo)致不正確的行為,并且如果
// 重新生成代碼,這些更改將會(huì)丟失。
//
//------------------------------------------------------------------------------
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Serialization;
//
// 此源代碼由 wsdl 自動(dòng)生成, 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]));
}
}
}
==================================================================
互億無線驗(yàn)證碼短信接口下載地址:http://422ajvm.cn/duanxin.html
如有疑問,請(qǐng)聯(lián)系我們的技術(shù),或者訪問我們的網(wǎng)站了解更多信息:http://422ajvm.cn/
開通免費(fèi)體驗(yàn)賬戶
在線自助開通互億無線云通信平臺(tái)賬戶
免費(fèi)開通 產(chǎn)品詳情查看短信產(chǎn)品報(bào)價(jià)
新用戶促銷套餐,首購(gòu)優(yōu)惠,直接下單購(gòu)買
驗(yàn)證碼已發(fā)送到您的手機(jī),請(qǐng)查收!
輸入驗(yàn)證碼后,點(diǎn)擊“開通體驗(yàn)賬戶”按鈕可立即開通體驗(yàn)賬戶。