本代码示例是基于C 的六派数据接口进行数据请求 API服务请求的代码示例,使用前你需要:
①:通过https://www.6api.net/api/sms/ 申请API服务
以下是完整代码示例:
//post请求
#include <iostream>
//引入第三方库libcurl(需要配置相应环境)
#include <curl/curl.h>
int main(int argc, const char * argv[]) {
CURL *curl;
CURLcode res;
curl_global_init(CURL_GLOBAL_DEFAULT);
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://open.liupai.net/sms/send");
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "appkey=yourappsecret&mobile=参数1&content=参数2&templateid=参数3");
res = curl_easy_perform(curl);
std::cout << res << std::endl;
curl_easy_cleanup(curl);
}
//清空环境
curl_global_cleanup();
return 0;
}
本代码示例是基于C 的六派数据接口进行数据请求 API服务请求的代码示例,使用前你需要:
①:通过https://www.6api.net/api/sms/ 申请API服务
以下是完整代码示例:
//post请求
#include <iostream>
//引入第三方库libcurl(需要配置相应环境)
#include <curl/curl.h>
int main(int argc, const char * argv[]) {
CURL *curl;
CURLcode res;
curl_global_init(CURL_GLOBAL_DEFAULT);
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://open.liupai.net/sms/balance");
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "appkey=yourappsecret");
res = curl_easy_perform(curl);
std::cout << res << std::endl;
curl_easy_cleanup(curl);
}
//清空环境
curl_global_cleanup();
return 0;
}
本代码示例是基于C 的六派数据接口进行数据请求 API服务请求的代码示例,使用前你需要:
①:通过https://www.6api.net/api/sms/ 申请API服务
以下是完整代码示例:
//post请求
#include <iostream>
//引入第三方库libcurl(需要配置相应环境)
#include <curl/curl.h>
int main(int argc, const char * argv[]) {
CURL *curl;
CURLcode res;
curl_global_init(CURL_GLOBAL_DEFAULT);
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://open.liupai.net/sms/addaccount");
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "appkey=yourappsecret&company=参数1&signature=参数2&statusurl=参数3&replyurl=参数4&replyusername=参数5&replypassword=参数6&totalnum=100");
res = curl_easy_perform(curl);
std::cout << res << std::endl;
curl_easy_cleanup(curl);
}
//清空环境
curl_global_cleanup();
return 0;
}
本代码示例是基于C 的六派数据接口进行数据请求 API服务请求的代码示例,使用前你需要:
①:通过https://www.6api.net/api/sms/ 申请API服务
以下是完整代码示例:
//post请求
#include <iostream>
//引入第三方库libcurl(需要配置相应环境)
#include <curl/curl.h>
int main(int argc, const char * argv[]) {
CURL *curl;
CURLcode res;
curl_global_init(CURL_GLOBAL_DEFAULT);
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://open.liupai.net/sms/accountlist");
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "appkey=yourappsecret&page=参数1&pageSize=参数2");
res = curl_easy_perform(curl);
std::cout << res << std::endl;
curl_easy_cleanup(curl);
}
//清空环境
curl_global_cleanup();
return 0;
}
本代码示例是基于C 的六派数据接口进行数据请求 API服务请求的代码示例,使用前你需要:
①:通过https://www.6api.net/api/sms/ 申请API服务
以下是完整代码示例:
//post请求
#include <iostream>
//引入第三方库libcurl(需要配置相应环境)
#include <curl/curl.h>
int main(int argc, const char * argv[]) {
CURL *curl;
CURLcode res;
curl_global_init(CURL_GLOBAL_DEFAULT);
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://open.liupai.net/sms/editaccount");
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "appkey=yourappsecret&accountid=参数1&company=参数2&signature=参数3&statusurl=参数4&replyurl=参数5&replyusername=参数6&replypassword=参数7&totalnum=参数8");
res = curl_easy_perform(curl);
std::cout << res << std::endl;
curl_easy_cleanup(curl);
}
//清空环境
curl_global_cleanup();
return 0;
}
本代码示例是基于C 的六派数据接口进行数据请求 API服务请求的代码示例,使用前你需要:
①:通过https://www.6api.net/api/sms/ 申请API服务
以下是完整代码示例:
//post请求
#include <iostream>
//引入第三方库libcurl(需要配置相应环境)
#include <curl/curl.h>
int main(int argc, const char * argv[]) {
CURL *curl;
CURLcode res;
curl_global_init(CURL_GLOBAL_DEFAULT);
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://open.liupai.net/sms/addtemplate");
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "appkey=yourappsecret&accountid=参数1&title=参数2&content=参数3&ismarket=参数4");
res = curl_easy_perform(curl);
std::cout << res << std::endl;
curl_easy_cleanup(curl);
}
//清空环境
curl_global_cleanup();
return 0;
}
本代码示例是基于C 的六派数据接口进行数据请求 API服务请求的代码示例,使用前你需要:
①:通过https://www.6api.net/api/sms/ 申请API服务
以下是完整代码示例:
//post请求
#include <iostream>
//引入第三方库libcurl(需要配置相应环境)
#include <curl/curl.h>
int main(int argc, const char * argv[]) {
CURL *curl;
CURLcode res;
curl_global_init(CURL_GLOBAL_DEFAULT);
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://open.liupai.net/sms/templatelist");
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "appkey=yourappsecret&accountid=参数1&page=参数2&pageSize=参数3");
res = curl_easy_perform(curl);
std::cout << res << std::endl;
curl_easy_cleanup(curl);
}
//清空环境
curl_global_cleanup();
return 0;
}
本代码示例是基于C 的六派数据接口进行数据请求 API服务请求的代码示例,使用前你需要:
①:通过https://www.6api.net/api/sms/ 申请API服务
以下是完整代码示例:
//post请求
#include <iostream>
//引入第三方库libcurl(需要配置相应环境)
#include <curl/curl.h>
int main(int argc, const char * argv[]) {
CURL *curl;
CURLcode res;
curl_global_init(CURL_GLOBAL_DEFAULT);
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://open.liupai.net/sms/sendlogs");
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "appkey=yourappsecret&templateid=参数1&start_date=2022-06-01&end_date=2022-06-18&page=1");
res = curl_easy_perform(curl);
std::cout << res << std::endl;
curl_easy_cleanup(curl);
}
//清空环境
curl_global_cleanup();
return 0;
}