zoukankan      html  css  js  c++  java
  • 微信 msg_sec_check接口PHP 调用

    $checkContent = '要检测的内容';
    $url = 'https://api.weixin.qq.com/wxa/msg_sec_check?access_token='. $res["access_token"];
    $data = json_encode(array('content'=>$checkContent),JSON_UNESCAPED_UNICODE);
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_HEADER, FALSE);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
    curl_setopt($ch, CURLOPT_URL,$url); // url
    curl_setopt($ch, CURLOPT_POST, TRUE);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $data); // json数据
    $res = curl_exec($ch); // 返回值
    curl_close($ch);
    $result = json_decode($res,true);

    return $result;

  • 相关阅读:
    服务器搭建Git
    BGP协议详解
    以太坊
    燃 * & *
    UML类图解析
    day8.文件操作
    python面试题汇总
    day5.字典
    day5.类型汇总
    day3,4总结程序
  • 原文地址:https://www.cnblogs.com/zhaoyun4122/p/9809566.html
Copyright © 2011-2022 走看看