function downloadWeiXinFile($url) { $ch = curl_init($url); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_NOBODY, 0); curl_setopt($ch, CURL_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURL_SSL_VERIFYHOST, FALSE); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $package = curl_exec($ch); $httpinfo = curl_getinfo($ch); curl_close($ch); $imageAll = array_merge(array('header' => $httpinfo), array('body' => $package)); return $imageAll; } function saveWeixinFile($filename, $filecontent) { $local_file = fopen($filename, 'w'); if (false !== $local_file) { if (false !== fwrite($local_file, $filecontent)) { fclose($local_file); } } } } $jsonData = '{ "card_id": "pSz8NuBa1Ic5Rn7wtphdga4Zzt20" }'; $jssdk = new JSSDK('wxfcea725d621989f7', 'c732e508229ddb6568e2216fa7c62fa2'); //$a = $jssdk->wxBatchQueryCardList(); $a = $jssdk->wxCardGetInfo($jsonData); var_dump($a);