zoukankan      html  css  js  c++  java
  • 速卖通api--获取商品信息

       <?

        $productId    = 'xxxx';//你的产品id
        $access_token = 'xxxxx';//你的授权码
        $appSecret    = 'xxxx';//速卖通的密钥
            
        //生成签名
        $code_arr = array(
            'productId' => $productId,
            'access_token' => $access_token
        );
        ksort($code_arr);
        $sign_str = "param2/1/aliexpress.open/api.findAeProductById/4947390";
        foreach ($code_arr as $key=>$val)
            $sign_str .= $key . $val;
            
        var_dump($sign_str);die;
        $code_sign = strtoupper(bin2hex(hash_hmac("sha1", $sign_str, $appSecret, true)));
              
        $get_code_url = "http://gw.api.alibaba.com/openapi/param2/1/aliexpress.open/api.findAeProductById/速卖通的编号?productId=".$productId."&access_token=".$access_token."&_aop_signature=".$code_sign;
        echo 'get_code_url地址:      '.$get_code_url.'<br /> <br />';

    ?>

  • 相关阅读:
    利用pyautogui自动化领取dnf的在线养竹活动的竹子
    idea2019.3版本的安装
    二叉树文本分析
    表达式树的创建
    24点游戏
    二叉树
    队列操作
    HuffmanTree
    两数之和
    面向对象Python
  • 原文地址:https://www.cnblogs.com/wendong/p/3860522.html
Copyright © 2011-2022 走看看