本代码示例是基于PHP的六派数据接口进行数据请求 短信发送 API服务请求的代码示例,使用前你需要:
①:通过https://www.6api.net/api/sms/ 申请API服务
以下是完整代码示例:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | require_once ( "curl.func.php" );
$method = "POST" ;
$url = "http://open.liupai.net/sms/send" ;
$headers = NULL;
$params = array (
"appkey" => "yourappsecret" ,
"mobile" => "参数1" ,
"content" => "参数2" ,
"templateid" => "参数3"
);
$result = api_curl( $method , $url , $headers , $params );
if ( $result ) {
$body = json_decode( $result [ "body" ], TRUE);
$status_code = $body [ "status" ];
if ( $status_code == "200" ) {
var_dump( $body [ "result" ]);
} else
var_dump( $body );
} else
echo "发送请求失败" ;
|
本代码示例是基于PHP的六派数据接口进行数据请求 短信发送 API服务请求的代码示例,使用前你需要:
①:通过https://www.6api.net/api/sms/ 申请API服务
以下是完整代码示例:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | require_once ( "curl.func.php" );
$method = "POST" ;
$url = "http://open.liupai.net/sms/balance" ;
$headers = NULL;
$params = array (
"appkey" => "yourappsecret"
);
$result = api_curl( $method , $url , $headers , $params );
if ( $result ) {
$body = json_decode( $result [ "body" ], TRUE);
$status_code = $body [ "status" ];
if ( $status_code == "200" ) {
var_dump( $body [ "result" ]);
} else
var_dump( $body );
} else
echo "发送请求失败" ;
|
本代码示例是基于PHP的六派数据接口进行数据请求 短信发送 API服务请求的代码示例,使用前你需要:
①:通过https://www.6api.net/api/sms/ 申请API服务
以下是完整代码示例:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | require_once ( "curl.func.php" );
$method = "POST" ;
$url = "http://open.liupai.net/sms/addaccount" ;
$headers = NULL;
$params = array (
"appkey" => "yourappsecret" ,
"company" => "参数1" ,
"signature" => "参数2" ,
"statusurl" => "参数3" ,
"replyurl" => "参数4" ,
"replyusername" => "参数5" ,
"replypassword" => "参数6" ,
"totalnum" => "100"
);
$result = api_curl( $method , $url , $headers , $params );
if ( $result ) {
$body = json_decode( $result [ "body" ], TRUE);
$status_code = $body [ "status" ];
if ( $status_code == "200" ) {
var_dump( $body [ "result" ]);
} else
var_dump( $body );
} else
echo "发送请求失败" ;
|
本代码示例是基于PHP的六派数据接口进行数据请求 短信发送 API服务请求的代码示例,使用前你需要:
①:通过https://www.6api.net/api/sms/ 申请API服务
以下是完整代码示例:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | require_once ( "curl.func.php" );
$method = "POST" ;
$url = "http://open.liupai.net/sms/accountlist" ;
$headers = NULL;
$params = array (
"appkey" => "yourappsecret" ,
"page" => "参数1" ,
"pageSize" => "参数2"
);
$result = api_curl( $method , $url , $headers , $params );
if ( $result ) {
$body = json_decode( $result [ "body" ], TRUE);
$status_code = $body [ "status" ];
if ( $status_code == "200" ) {
var_dump( $body [ "result" ]);
} else
var_dump( $body );
} else
echo "发送请求失败" ;
|
本代码示例是基于PHP的六派数据接口进行数据请求 短信发送 API服务请求的代码示例,使用前你需要:
①:通过https://www.6api.net/api/sms/ 申请API服务
以下是完整代码示例:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | require_once ( "curl.func.php" );
$method = "POST" ;
$url = "http://open.liupai.net/sms/editaccount" ;
$headers = NULL;
$params = array (
"appkey" => "yourappsecret" ,
"accountid" => "参数1" ,
"company" => "参数2" ,
"signature" => "参数3" ,
"statusurl" => "参数4" ,
"replyurl" => "参数5" ,
"replyusername" => "参数6" ,
"replypassword" => "参数7" ,
"totalnum" => "参数8"
);
$result = api_curl( $method , $url , $headers , $params );
if ( $result ) {
$body = json_decode( $result [ "body" ], TRUE);
$status_code = $body [ "status" ];
if ( $status_code == "200" ) {
var_dump( $body [ "result" ]);
} else
var_dump( $body );
} else
echo "发送请求失败" ;
|
本代码示例是基于PHP的六派数据接口进行数据请求 短信发送 API服务请求的代码示例,使用前你需要:
①:通过https://www.6api.net/api/sms/ 申请API服务
以下是完整代码示例:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | require_once ( "curl.func.php" );
$method = "POST" ;
$url = "http://open.liupai.net/sms/addtemplate" ;
$headers = NULL;
$params = array (
"appkey" => "yourappsecret" ,
"accountid" => "参数1" ,
"title" => "参数2" ,
"content" => "参数3" ,
"ismarket" => "参数4"
);
$result = api_curl( $method , $url , $headers , $params );
if ( $result ) {
$body = json_decode( $result [ "body" ], TRUE);
$status_code = $body [ "status" ];
if ( $status_code == "200" ) {
var_dump( $body [ "result" ]);
} else
var_dump( $body );
} else
echo "发送请求失败" ;
|
本代码示例是基于PHP的六派数据接口进行数据请求 短信发送 API服务请求的代码示例,使用前你需要:
①:通过https://www.6api.net/api/sms/ 申请API服务
以下是完整代码示例:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | require_once ( "curl.func.php" );
$method = "POST" ;
$url = "http://open.liupai.net/sms/templatelist" ;
$headers = NULL;
$params = array (
"appkey" => "yourappsecret" ,
"accountid" => "参数1" ,
"page" => "参数2" ,
"pageSize" => "参数3"
);
$result = api_curl( $method , $url , $headers , $params );
if ( $result ) {
$body = json_decode( $result [ "body" ], TRUE);
$status_code = $body [ "status" ];
if ( $status_code == "200" ) {
var_dump( $body [ "result" ]);
} else
var_dump( $body );
} else
echo "发送请求失败" ;
|
本代码示例是基于PHP的六派数据接口进行数据请求 短信发送 API服务请求的代码示例,使用前你需要:
①:通过https://www.6api.net/api/sms/ 申请API服务
以下是完整代码示例:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | require_once ( "curl.func.php" );
$method = "POST" ;
$url = "http://open.liupai.net/sms/sendlogs" ;
$headers = NULL;
$params = array (
"appkey" => "yourappsecret" ,
"templateid" => "参数1" ,
"start_date" => "2022-06-01" ,
"end_date" => "2022-06-18" ,
"page" => "1"
);
$result = api_curl( $method , $url , $headers , $params );
if ( $result ) {
$body = json_decode( $result [ "body" ], TRUE);
$status_code = $body [ "status" ];
if ( $status_code == "200" ) {
var_dump( $body [ "result" ]);
} else
var_dump( $body );
} else
echo "发送请求失败" ;
|