zoukankan      html  css  js  c++  java
  • php 检测敏感字

    public function getMin($content){

    //
    调用接口
    $content_url ="http://www.ju1.cn/index.php/Index/add.html"; //curl post $content_arr = ['mgtype'=>1, 'mz_wj_type'=>1, 'ty_wj_type'=>1, 'text'=>$content, 'xw_wj_type'=>1]; $ch = curl_init();//初始化curl curl_setopt($ch, CURLOPT_URL,$content_url);//抓取指定网页 curl_setopt($ch, CURLOPT_HEADER, 0);//设置header curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);//要求结果为字符串且输出到屏幕上 curl_setopt($ch, CURLOPT_POST, 1);//post提交方式 curl_setopt($ch, CURLOPT_POSTFIELDS, $content_arr); $pi_data = curl_exec($ch);//运行curl curl_close($ch); $str ="[{(.*)}]"; preg_match($str,$pi_data,$pre); if (!empty($pre[1])){ $pre = "[{".$pre[1]."}]";      return $pre;
          }
          return false;
         
    }

     敏感字,敏感字检测,php敏感字,php敏感字检测

  • 相关阅读:
    Vue知识总结
    Excel使用技巧
    java框架总结
    java反射学习总结
    java虚拟机
    vue学习知识
    mysql索引知识
    前端函数定义及表格总结
    SpringMVC异常处理
    restful风格的概念
  • 原文地址:https://www.cnblogs.com/phpwyl/p/10070082.html
Copyright © 2011-2022 走看看