BS系统功能不足怎么办,或者需要关联其他的查询进行返回软件客户端!
可以使用自己开放自定义接口进行解决!
系统API接口路径:/include/applibapi/api/Default
接口命名:AppEn.chong.lg.php API名称=chong.lg API说明:软件充值vip续期_帮助中心_BSPHP网络验证系统
案例:AppEn.Customized.lg.php 纯源码-后台加栏目与API接口官方开源插件 - BSPHP网络验证系统
//演示载入自定义文件 include (plug_get_bsphp_dir().'/Plug/Customized/icc.php'); //演示需要登录操作 $uid=plug_get_session_value('USER_UID');//获取当前登录UID $info=plug_set_data('info');//接收传递的参数 if($uid<=0){ plug_PrInfo('请登录在操作'); } //获取传递参数 $aaaa = plug_set_data('type'); //读取自定义数据库 $sql = "SELECT * FROM `plug_customized_info` WHERE `i_sdate` = 0 order by rand() LIMIT 1"; $array = plug_query_array($sql); //调用映入文件函数 $get_icc = get_icc( $array['i_pp'], $array['i_xh'], $array['i_azbb'], $array['i_sdk'],$aaaa); $outinfo = ''; foreach($array as $v){ $outinfo.= $v.'||'; } //接口功能演示读软件信息 $sql = "SELECT * FROM `bs_php_appinfo` WHERE `app_daihao` = {$_GET['appid']} LIMIT 1"; $array_app = plug_query_array($sql); $key = $array_app['app_miaoshu']; //api接口专用输出,输出会自动集成加密和输出格式进行出内容给客户端 plug_PrInfo('okinfo|'.$encode.'|'.$key.'|type='.$aaaa);
API=Customized.lg
传递参数1=type
参数参数2=data
后台软件配置接收参数方式根据自己需要进行设置,不自动选择自动即可
PSOT:取BSphpSeSsL_帮助中心_BSPHP网络验证系统
- POST数据包
- api=Customized.lg&date=2018-12-21-13:14:12&md5=&mutualkey=6600cfcd5ac01b9bb3f2460eb416daa8&appsafecode=12345&type=1&data=2
案例二
plug_PrInfo("我是bsphp插件");
客户端请求api后就直接得到这段文本了