-
接码验证
[PHP]- https://www.6api.net/api/connectioncode/
- 阅读数:46413 上传时间:2020-11-21
- 示例代码
本代码示例是基于PHP的六派数据接口进行数据请求 自动接收验证码(apk配置) API服务请求的代码示例,使用前你需要:
①:通过https://www.6api.net/api/connectioncode/ 申请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/jiema/pushSMS" ; $headers = NULL; $params = array ( "appkey" => "yourappsecret" , "content" => "【拼多多】您的验证码是605677。请于5分钟内完成验证,若非本人操作,请忽略本短信。" , "phone" => "参数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 "发送请求失败" ; |