function curl_post_weixin($url,$content){
    $curl = curl_init();
    $headerArray =array("Content-type:application/json;charset=‘utf-8‘","Accept:application/json");
    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, 1);
    curl_setopt($curl,CURLOPT_HTTPHEADER,$headerArray);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($content,JSON_UNESCAPED_UNICODE));  //json格式不被转义加上JSON_UNESCAPED_UNICODE
    $response = curl_exec($curl);
    curl_close($curl);
    $response=json_decode($response);
    return $response;
}
检测图片
curl_setopt($curl, CURLOPT_POSTFIELDS, [‘media‘=>new CURLFILE($content)]); //实例化CURLFILE原文:https://www.cnblogs.com/jiangjie050/p/14870080.html