Please answer your questions about API! !
桂花之流
桂花之流 2017-07-17 12:02:35
0
1
1027
桂花之流
桂花之流

reply all (1)
Ailon

The above example has made it very clear

 'look@me.com', // 版本 'Version' => '1.0', // 要调用的方法 'Action' => 'FeedList', 'Format' => 'XML', 'Timestamp' => $now->format(DateTime::ISO8601) ); // 排序 ksort($parameters); // 转码 $encoded = array(); // 循环拼接 foreach ($parameters as $name => $value) { $encoded[] = rawurlencode($name) . '=' . rawurlencode($value); } // 把数组用&连接成字符串 UserID=look@me.com&Version=1.0&Action=FeedList $concatenated = implode('&', $encoded); // 你的api_key api_key = 'b1bdb357ced10fe4e9a69840cdd4f0e9c03d77fe'; // 加密 $parameters['Signature'] = rawurlencode(hash_hmac('sha256', $concatenated, $api_key, false)); // 打印一下$parameters 就获取到签名啦 Action=FeedList Format=XML Timestamp=2015-07-01T11:11:11+00:00 UserID=look@me.com Version=1.0 Signature=3ceb8ed91049dfc718b0d2d176fb2ed0e5fd74f76c5971f34cdab48412476041


    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!