#include <stdio.h>
unsigned char m_sms1[] ={
0x0b,
0x05,
0x04,
0xc3,
0x4f,
0xc0,
0x02,
0x00,
0x03,
0x04,
0x02,
0x01,
//wdp headers end
0x01,
0x06,
0x2c,
0x1f,
0x2a,
0x61,0x70,0x70,0x6c,0x69,0x63,0x61,0x74,0x69,
0x6f,0x6e,0x2f,0x78,0x2d,0x77,0x61,0x70,0x2d,
0x70,0x72,0x6f,0x76,0x2e,0x62,0x72,0x6f,0x77,
0x73,0x65,0x72,0x2d,0x73,0x65,0x74,0x74,0x69,
0x6e,0x67,0x73,
//wsp headers
0x00,
0x81,
0xea,
0x01,
0x01,
0x6a,
0x00,
0x45,
0xc6,
0x06,
0x01,
0x87,
0x12,
0x45,
0x01,
0x87,
0x13,
0x11,
0x03,
0x31, 0x32, 0x33, 0x2e, 0x34, 0x35, 0x2e,
0x31, 0x32, 0x33, 0x2e, 0x36, 0x37,
0x00,
0x01,
0x87,
0x21,
0x11,
0x03,
0x2b, 0x34, 0x35, 0x38, 0x33, 0x35, 0x37, 0x32,
0x00,
0x01,
0x87,
0x22,
0x70,
0x01,
0x87,
0x23,
0x11,
0x03,
0x77, 0x61, 0x70, 0x75, 0x73, 0x65, 0x72,
0x00,
0x01,
0x87,
0x24,
0x11,
0x03,
0x77, 0x61, 0x70, 0x70, 0x61, 0x3, 0x73, 0x77,
0x00,
0x01,
0x87,
0x28,
0x72,
0x01,
0x87
};
unsigned char m_sms2[] = {
0x0b,
0x05,
0x04,
0xc3,
0x4f,
0xc0,
0x02,
0x00,
0x03,
0x04,
0x02,
0x02,
//wdp headers end
0x29,
0x6a,
0x01,
0x01,
0x86,
0x07,
0x11,
0x03,
'h', 't', 't', 'p',':','/', '/', 'h',
'e', 'r', 'o', '.', 't', 'x','s','m','s','.','c','o','m',
0x00,
0x01,
0xc6,
0x08,
0x01,
0x87,
0x15,
0x11,
0x03,
'h', 'e', 'r', 'o', '-', 't', 'x','s','v','c',
0x00,
0x01,
0x01,
0xc6,
0x7f,
0x01,
0x87,
0x15,
0x11,
0x03,
'h', 'e', 'r', 'o', '-', 't', 'x',
0x00,
0x01,
0x87,
0x17,
0x11,
0x03,
'h', 't', 't', 'p', ':','/', '/', 'h',
'e', 'r', 'o', '.', 't', 'x','s','m','s','.','c','o','m',
0x00,
0x01,
0x01,
0x01
};
int main()
{
printf("sz:%d\n",sizeof(m_sms1));
printf("sz:%d\n",sizeof(m_sms2));
if(!connect_sms_server()) {
printf("连接smsc错误。\n");
return -1;
}
//sms_send_msg_b("13924060425","hi",2,0x0f);
send_sms_1();
send_sms_2();
return 0;
}
#define mobile_num "13924060425"
int send_sms_1()
{
sms_send_msg_b(mobile_num,m_sms1,sizeof(m_sms1),0x04);
}
int send_sms_2()
{
sms_send_msg_b(mobile_num,m_sms2,sizeof(m_sms2),0x04);
}
Java Asp PHP .Net XML C/C++ CGI VB Jsp J2ee J2se J2me EJB Servlet Tomcat Resin Struts Weblogic Eclipse ANT GUI JMS Web servise IDEA Webphere Hibernate Spring Jboss Applet Swing Socket Javamail Perl Ajax P2P 安全 模式 框架 测试 开源 游戏
Windows XP Windows 2000 Windows 2003 Windows Me Windows 9.x Linux UNIX 注册表 操作系统 服务器 应用服务器