本文为您提供了C语言版本的语音通知接口对接DEMO示例
//接口类型:互亿无线语音通知接口。
//账户注册:请通过该地址开通账户 http://user.ihuyi.com/?AX7wLG
//注意事项:
//(1)调试期间,请仔细阅读接口文档;
//(2)请使用APIID(查看APIID请登录用户中心->语音通知->帐户及签名设置->APIID)及 APIkey来调用接口;
//(3)该代码仅供接入互亿无线语音通知接口参考使用,客户可根据实际需要自行编写;
#include #include #include #include #include #include #include #include #include #include #include #include #include #define IPSTR "api.vm.ihuyi.com" #define PORT 80 #define BUFSIZE 1024 //调试日期 2015-07-27 //linux下的编译方法 gcc -o sms sms.c int main(int argc, char **argv) { int sockfd, ret, i, h,srandnum; struct sockaddr_in servaddr; char str1[4096], str2[4096], buf[BUFSIZE], *str; socklen_t len; fd_set t_set1; struct timeval tv; if ((sockfd = socket(AF_INET, SOCK_STREAM, 0)) < 0 ) { printf("创建网络连接失败,本线程即将终止---s