$appID, 'salt' => $salt, 'signature' => $sig)); $tokenStr=file_get_contents($url); //var_dump($tokenStr);die; // echo $tokenStr; // 获取token // echo 11111;die; return json_decode($tokenStr, true)['data']['access_token']; } public static function generateSign($appId, $salt, $secretKey) { $seed = 'app_id=' . $appId . '&salt=' . $salt . '&secret_key=' . $secretKey; return md5(urlencode($seed)); } public static function generateBusinessSign($appId, $token, $urlencodeData, $salt) { $seed = 'app_id=' . $appId . '&access_token=' . $token . '&data=' . $urlencodeData . '&salt=' . $salt; return md5($seed); } }