本文为您提供了C++语言版本的语音通知接口对接DEMO示例
//接口类型:互亿无线语音通知接口。
// 账户注册:请通过该地址开通账户 http://user.ihuyi.com/?AX7wLG
// 注意事项:
//(1)调试期间,请仔细阅读接口文档;
//(2)请使用APIID(查看APIID请登录用户中心->语音通知->帐户及签名设置->APIID)及 APIkey来调用接口;
//(3)该代码仅供接入互亿无线语音通知接口参考使用,客户可根据实际需要自行编写;
// DEMO仅作参考
#include #include #include #include #include #include #include #include #include #include #include #include #include #define SA struct sockaddr #define MAXLINE 4096 #define MAXSUB 2000 #define MAXPARAM 2048 #define LISTENQ 1024 extern int h_errno; int basefd; char *hostname = "http://api.vm.ihuyi.com"; char *send_sms_uri = "/webservice/voice.php?method=Submit&format=json"; /** * 发http post请求 */ ssize_t http_post(char *page, char *poststr) { char sendline[MAXLINE + 1], recvline[MAXLINE + 1]; ssize_t n; s