コード例 #1
0
ファイル: ShowApi.class.php プロジェクト: eduNeusoft/weixin
 static function getIDInfo($id)
 {
     $paramArr = array('showapi_appid' => ShowApiSdk::$showapi_appid, 'id' => $id, 'showapi_timestamp' => date('YmdHis'));
     $sign = ShowApiSdk::createSign($paramArr);
     $strParam = ShowApiSdk::createStrParam($paramArr);
     $strParam .= 'showapi_sign=' . $sign;
     $url = 'http://route.showapi.com/25-3?' . $strParam;
     $result = file_get_contents($url);
     $result = json_decode($result);
     if (intval($result->showapi_res_code) == 0) {
         if ($result->showapi_res_body->retMsg == "success") {
             return $result->showapi_res_body->retData;
         }
     } else {
         return '';
     }
 }