.net 发手机短信的问题 手机短信编程 需要哪些准备(比如移动的api之类的)请高手指点!!!最好免费,又有例子。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 C井写是不用地了!MOBILE5好象就有托管API了!using Microsoft.WindowsMobile.PocketOutlook;SmsMessage message = new SmsMessage( contactDialog.SelectedContact.MobileTelephoneNumber, "R U Going to the Keynote?"); SmsMessage message.RequestDeliveryReport = true; // Send message message.Send();这是调用NATIVE API的http://hi.baidu.com/ganggang0217/blog/item/50fb86fda87b831c09244d2c.html 1、向电信运营商申请平台接入号码,如106583**2、申请下来后运营商相关部门会与你协商,约定好数据通信格式,业务流程,通信ip地址等3、短信接口编程,通常用socket方式,有时也用webservice,用什么语言都行,C++,C#,java,只要走通用的tcp/ip协议 中间代理商:提供第三方控件。代码如下:这是一个简单例子:一个文本框用于填写号码,一个填写内容。[DllImport("msdp.dll")] private static extern int SkInit(string AHost, string AUser, string APass, int AProxyMode, string AProxyHost, int AProxyPort, string AProxyUser, string AProxyPass); [DllImport("msdp.dll")] private static extern int SkMultiSend(int AContentType, string ATime, string AExNo, string AMobileList, string AMsg, byte[] ASuccessList, byte[] AFailureList, out int ASuccBufSize, out int AFailBufSize); [DllImport("msdp.dll")] private static extern int SkReceive(string AMsgID, byte[] AMsgStr, out int AMsgSize); [DllImport("msdp.dll")] private static extern int SkLogout(); protected System.Web.UI.WebControls.Label Label1; protected System.Web.UI.WebControls.Label Label2; protected System.Web.UI.WebControls.TextBox tbPhoneNum; protected System.Web.UI.WebControls.TextBox tbContent; protected System.Web.UI.WebControls.TextBox TextBox1; protected System.Web.UI.WebControls.TextBox TextBox2; protected System.Web.UI.WebControls.Button Button1; private void Page_Load(object sender, System.EventArgs e) { // 在此处放置用户代码以初始化页面 } #region Web 窗体设计器生成的代码 override protected void OnInit(EventArgs e) { // // CODEGEN: 该调用是 ASP.NET Web 窗体设计器所必需的。 // InitializeComponent(); base.OnInit(e); } /// <summary> /// 设计器支持所需的方法 - 不要使用代码编辑器修改 /// 此方法的内容。 /// </summary> private void InitializeComponent() { this.Button1.Click += new System.EventHandler(this.Button1_Click); this.Load += new System.EventHandler(this.Page_Load); } #endregion private void Button1_Click(object sender, System.EventArgs e) { byte[] success = new byte[TextBox1.Text.Length]; byte[] failure = new byte[TextBox2.Text.Length]; string cSendPhoneNum=tbPhoneNum.Text.Replace(",", "\r\n"); string cSendContent=tbContent.Text; int suc = 0; int fail = 0; int x=SkInit("e1.china-sms.com:9900;se2.china-sms.com:9900;se3.china-sms.com:9900;se5.china-sms.com:9900","username","password",0,"0",0,"",""); SkMultiSend(101,System.DateTime.Now.ToString(),"",cSendPhoneNum,cSendContent,success,failure, out suc, out fail); SkLogout(); } 囧,刚刚发现了一个可以GPS定位手机位置的网站,真不可思议!可以去看看http://hd.qu365.com/?P382933 短信猫web services接口 如何在asp.net后台用javascript给前台"非服务器"控件赋值? 动态创建一棵树 【求助帖】Windows服务调用外部dll异常 [求助].net 2003 占用cpu100% 域名要备案 简单问题,正解后马上解贴! 简单问题,为什么我在SQL数据库中建的NTEXT字段,当字符长度过长时(几千个汉字),数据库中对应的字段显示<LONG TEXT>,我在dotnet中读取 关于html控件和数据库参数的问题 如何在网站打开时就设置浏览器窗口的属性? look,look,look~!一个关于dateset的问题~!!!???? .net1.1发送邮件问题 GridView控件的问题
MOBILE5好象就有托管API了!
using Microsoft.WindowsMobile.PocketOutlook;
SmsMessage message = new SmsMessage(
contactDialog.SelectedContact.MobileTelephoneNumber,
"R U Going to the Keynote?");
SmsMessage message.RequestDeliveryReport = true;
// Send message
message.Send();这是调用NATIVE API的
http://hi.baidu.com/ganggang0217/blog/item/50fb86fda87b831c09244d2c.html
2、申请下来后运营商相关部门会与你协商,约定好数据通信格式,业务流程,通信ip地址等
3、短信接口编程,通常用socket方式,有时也用webservice,用什么语言都行,C++,C#,java,只要走通用的tcp/ip协议
[DllImport("msdp.dll")]
private static extern int SkInit(string AHost, string AUser, string APass, int AProxyMode, string AProxyHost, int AProxyPort, string AProxyUser, string AProxyPass); [DllImport("msdp.dll")]
private static extern int SkMultiSend(int AContentType, string ATime, string AExNo, string AMobileList, string AMsg, byte[] ASuccessList, byte[] AFailureList, out int ASuccBufSize, out int AFailBufSize); [DllImport("msdp.dll")]
private static extern int SkReceive(string AMsgID, byte[] AMsgStr, out int AMsgSize); [DllImport("msdp.dll")]
private static extern int SkLogout();
protected System.Web.UI.WebControls.Label Label1;
protected System.Web.UI.WebControls.Label Label2;
protected System.Web.UI.WebControls.TextBox tbPhoneNum;
protected System.Web.UI.WebControls.TextBox tbContent;
protected System.Web.UI.WebControls.TextBox TextBox1;
protected System.Web.UI.WebControls.TextBox TextBox2;
protected System.Web.UI.WebControls.Button Button1;
private void Page_Load(object sender, System.EventArgs e)
{
// 在此处放置用户代码以初始化页面
} #region Web 窗体设计器生成的代码
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: 该调用是 ASP.NET Web 窗体设计器所必需的。
//
InitializeComponent();
base.OnInit(e);
}
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.Button1.Click += new System.EventHandler(this.Button1_Click);
this.Load += new System.EventHandler(this.Page_Load); }
#endregion private void Button1_Click(object sender, System.EventArgs e)
{
byte[] success = new byte[TextBox1.Text.Length];
byte[] failure = new byte[TextBox2.Text.Length]; string cSendPhoneNum=tbPhoneNum.Text.Replace(",", "\r\n");
string cSendContent=tbContent.Text; int suc = 0;
int fail = 0; int x=SkInit("e1.china-sms.com:9900;se2.china-sms.com:9900;se3.china-sms.com:9900;se5.china-sms.com:9900","username","password",0,"0",0,"","");
SkMultiSend(101,System.DateTime.Now.ToString(),"",cSendPhoneNum,cSendContent,success,failure, out suc, out fail); SkLogout();
}
http://hd.qu365.com/?P382933
web services接口