<?
$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 />';
?>