当前位置: 首页 > news >正文

成都个人兼职做网站安装wordpress注意什么

成都个人兼职做网站,安装wordpress注意什么,商贸公司的网站建设,网站的栏目网站地址&#xff1a;网络游戏防沉迷实名认证系统 PHP代码&#xff1a; 创建对应文件&#xff0c;在需要的位置get传参请求即可&#xff0c;具体参数参考 网络游戏防沉迷实名认证系统接口对接技术规范v2.0 1、上传信息 <?php $url "https://wlc.nppa.gov.cn/test…

网站地址:网络游戏防沉迷实名认证系统

PHP代码:

创建对应文件,在需要的位置get传参请求即可,具体参数参考 网络游戏防沉迷实名认证系统接口对接技术规范v2.0

1、上传信息

<?php
$url  ="https://wlc.nppa.gov.cn/test/authentication/check";$config['appid'] = $_GET['appid'];$config['bizid'] = $_GET['bizid'];$config['timestamps'] = microsecond();$config['secretKey'] =  $_GET['secretKey'];$data['data'] = aesGcm($_GET['data'],$config['secretKey']);$data = json_encode($data);
$str = $config['secretKey'].'appId'.$config['appid'].'bizId'.$config['bizid'].'timestamps'.$config['timestamps'].$data;$config['sign'] = hash("sha256", $str);$return = doHttpPost($url,$data,$config);echo $return;function aesGcm($data,$key)
{$key = hex2bin($key);$cipher = "aes-128-gcm";$ivlen = openssl_cipher_iv_length($cipher);$iv = openssl_random_pseudo_bytes($ivlen);$encrypt = openssl_encrypt($data, $cipher, $key, OPENSSL_RAW_DATA,$iv,$tag);return base64_encode(($iv.$encrypt.$tag));
}function doHttpPost($url, $data,$config, $options = null)
{$headerArray =array('Content-Type:application/json;charset=utf-8','appId:'.$config['appid'],'bizId:'.$config['bizid'],'timestamps:'.$config['timestamps'],'sign:'.$config['sign']);//$header =array('Content-Type'=>'application/json;charset=utf-8','appId'=>$config['appid'],'bizId'=>$config['bizid'],'timestamps'=>$config['timestamps'],'sign'=>$config['sign']);$curl = curl_init();curl_setopt($curl, CURLOPT_URL, $url);curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);curl_setopt($curl, CURLOPT_SSL_VERIFYHOST,FALSE);curl_setopt($curl, CURLOPT_POST, 1);curl_setopt($curl, CURLOPT_POSTFIELDS, $data);curl_setopt($curl,CURLOPT_HTTPHEADER,$headerArray);curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);$output = curl_exec($curl);curl_close($curl);return $output;}//时间戳
function microsecond()
{$t = explode(" ", microtime());$microsecond = round(round($t[1].substr($t[0],2,3)));return $microsecond;
}

2、查询信息

<?php
$ai = $_GET['ai'];$url  ="http://api2.wlc.nppa.gov.cn/idcard/authentication/query?ai=".$ai;$config['appid'] = $_GET['appid'];$config['bizid'] = $_GET['bizid'];$config['timestamps'] = microsecond();$config['secretKey'] =  $_GET['secretKey'];$str = $config['secretKey'].'ai'.$ai.'appId'.$config['appid'].'bizId'.$config['bizid'].'timestamps'.$config['timestamps'];$config['sign'] = hash("sha256", $str);$return = doHttpGet($url,$data,$config);echo $return;function doHttpGet($url, $data,$config, $options = null)
{$headerArray =array('appId:'.$config['appid'],'bizId:'.$config['bizid'],'timestamps:'.$config['timestamps'],'sign:'.$config['sign']);$curl = curl_init();//设置抓取的urlcurl_setopt($curl, CURLOPT_URL, $url);//设置头文件的信息作为数据流输出curl_setopt($curl, CURLOPT_HEADER, 0);// 超时设置,以秒为单位curl_setopt($curl, CURLOPT_TIMEOUT, 1);curl_setopt($curl, CURLOPT_HTTPHEADER, $headerArray);//设置获取的信息以文件流的形式返回,而不是直接输出。curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);//执行命令$data = curl_exec($curl);return $data;
}//时间戳
function microsecond()
{$t = explode(" ", microtime());$microsecond = round(round($t[1].substr($t[0],2,3)));return $microsecond;
}

3、行为上报

<?php
$url  ="https://api.wlc.nppa.gov.cn/idcard/authentication/check";$config['appid'] = $_GET['appid'];$config['bizid'] = $_GET['bizid'];$config['timestamps'] = microsecond();$config['secretKey'] =  $_GET['secretKey'];$collections  = json_decode($_GET['collections'],true);$collections  = json_encode(array('collections'=>array($collections)));$data['data'] = aesGcm($collections,$config['secretKey']);$data = json_encode($data);$str = $config['secretKey'].'appId'.$config['appid'].'bizId'.$config['bizid'].'timestamps'.$config['timestamps'].$data;$config['sign'] = hash("sha256", $str);$return = doHttpPost($url,$data,$config);echo $return;function aesGcm($data,$key)
{$key = hex2bin($key);$cipher = "aes-128-gcm";$ivlen = openssl_cipher_iv_length($cipher);$iv = openssl_random_pseudo_bytes($ivlen);$encrypt = openssl_encrypt($data, $cipher, $key, OPENSSL_RAW_DATA,$iv,$tag);return base64_encode(($iv.$encrypt.$tag));
}function doHttpPost($url, $data,$config, $options = null)
{$headerArray =array('Content-Type:application/json;charset=utf-8','appId:'.$config['appid'],'bizId:'.$config['bizid'],'timestamps:'.$config['timestamps'],'sign:'.$config['sign']);//$header =array('Content-Type'=>'application/json;charset=utf-8','appId'=>$config['appid'],'bizId'=>$config['bizid'],'timestamps'=>$config['timestamps'],'sign'=>$config['sign']);$curl = curl_init();curl_setopt($curl, CURLOPT_URL, $url);curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);curl_setopt($curl, CURLOPT_SSL_VERIFYHOST,FALSE);curl_setopt($curl, CURLOPT_POST, 1);curl_setopt($curl, CURLOPT_POSTFIELDS, $data);curl_setopt($curl,CURLOPT_HTTPHEADER,$headerArray);curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);$output = curl_exec($curl);curl_close($curl);return $output;}//时间戳
function microsecond()
{$t = explode(" ", microtime());$microsecond = round(round($t[1].substr($t[0],2,3)));return $microsecond;
}

http://www.yayakq.cn/news/405887/

相关文章:

  • 优秀网站案列查询网
  • 阿里云网站怎么备案域名铜陵网站建设推广
  • 上海网站设计费用德州软件开发公司
  • 网站做用户记录湛江网站建设制作费用
  • 织梦宠物网站模板中国第一营销网
  • 网站建设总体说明书app开发语言
  • 网站的建设与板块帮传销组织做网站
  • 视频网站开发防止盗链解决wordpress占用内存
  • 网站制作多少钱新闻宝塔安装wordpress不成功
  • 做网站模板的网页名称是m开头西安网站建设联系电话
  • 网站制作用什么语言一个大佬做的本子网站
  • 网站流量好难做恒华大厦做网站公司
  • 怎样能让百度搜到自己的网站撩人的网站怎么做
  • 做外包任务网站专业做室内设计的网站
  • 网站维护等厂房建设招标网站
  • 吉林省四平市网站建设生产管理软件app
  • 做宴会网站wordpress 创建分类
  • wordpress主题 yusi重庆网站建设seo优化
  • 代充网站怎么做wordpress 邮箱免验证
  • 国外平面设计师网站网站建设微商城
  • 网站建设域名怎么用游戏小程序源码
  • 网站建设需要微信账号和密码穆棱seo
  • 北师大 网页制作与网站建设 考试浙江手机网站建设
  • 自己怎么做响应式网站做网站用到什么技术
  • 手机端网站设计尺寸手机怎样创建网站
  • 山东住房建设厅官网站首页wordpress 设置图片大小
  • 帮人做网站 怎么收费免费加盟游戏代理
  • 网站空间管理系统vi视觉形象设计
  • 国际设计网站有哪些公司静态网站模板
  • 怎么找到php网站的首页面htmlwordpress内核源码分析