$url = 'https://api.weixin.qq.com/cgi-bin//material/batchget_material?access_token='.$ACC_TOKEN;
$json = '{"type":"image","offset":"0","count":"5"}';
$ret = https_request($url,$json);
header("content-type:text/html;charset=utf-8") ;
$ret = json_decode($ret,true);
var_dump($ret);die;
function https_request($url, $data=null)
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$output = curl_exec($ch);
curl_close($ch);
return $output; }