我直接在接口里面调用的,不管我传什么图片微信异步回调给我的数据都是正常的 ,这是异步返回的数据{"ToUserName":"xxxx","FromUserName":"xxxxx","CreateTime":1723399339,"MsgType":"event","Event":"wxa_media_check","appid":"xxxcxxc","trace_id":"66b8fcaa-6a8b2125-0f03aa4e","version":2,"detail":[{"strategy":"content_model","errcode":0,"suggest":"pass","label":100,"prob":90}],"errcode":0,"errmsg":"ok","result":{"suggest":"pass","label":100}}
我的请求是
$dd = WeixinModel::checkMedia('https://img.52cee.cn/task_info/20240812/20240812_66b8fffbe4500_620.png','xxxxxxx');
public function checkMedia($access_token,$param){
$post_arr['url'] = sprintf(Comm_Config::getUseStatic('api.weixin.media_check'),$access_token);
$post_arr['data'] = $param;
$post_arr['header']['Content-Type'] = 'application/json';
try {
$qrcode_info = Helper_Http::post($post_arr);
return $qrcode_info;
} catch (ApiException $e) {
Exception_ErrorHandler::handleException($e);
return array('code'=>$e->getCode(),'msg'=>$e->getMessage());
}
}
我的请求参数是这样的
$para_arr = array('media_url'=>$media_url,'media_type'=>1,'version'=>2,'openid'=>$openid,'scene'=>4);
图片有防盗链,无法访问
别光会说不行,我刚才测试了,还是有防盗链,无法访问
你这地址外网都访问不到,检测个毛线默认返回pass