ecshop shopex ecmall zencart 淘宝OPen API 一键上传淘宝 利用open 淘宝开放平台 API 编辑更新商品同步淘宝
配置文件如下:请自行修改appid
<?php
error_reporting(0);
session_start();
require_once 'lib/function.php';
require_once 'page.Class.php';
/* 接收参数,此部分不需修改 */
$userNick=$_SESSION['nick'];
$sessions=$_SESSION['topsession'];
$num_iid = $_GET['num_iid'];
$iid = $_GET['iid'];
//$iid='16905513800';
$page_no = !($_GET['page'])?'1':intval($_GET['page']); //页码
$page_size = !($_GET['page_size'])?'20':intval($_GET['page_size']);//每页条数。取值范围:大于零的整数; 默认值:40;最大值:
/* 以下配置参数根据情况进行修改 */
//false为正式测试环境,true为测试环境
//配置沙箱环境说明:http://open.taobao.com/bbs/read.php?tid=19022
$testMode = 'false';
if ($testMode=='true'){
$url = 'http://gw.api.tbsandbox.com/router/rest?'; //沙箱环境提交URL
$sessionurl = 'http://container.api.tbsandbox.com/container?appkey='; //沙箱环境获取SessionKey
$appKey = '21186790';
$appSecret = '26dac0e885e1381d6ddb39034b22b3ae';
}else if($testMode=='false'){
$appKey = '21186790'; //填写自己申请的AppKey
$appSecret = '26dac0e885e1381d6ddb39034b22b3ae'; //填写自己申请的$appSecret
$url = 'http://gw.api.taobao.com/router/rest?'; //正式环境提交URL
$sessionurl = 'http://container.api.taobao.com/container?appkey='; //正式环境获取SessionKey
}
?>
先上效果图:
callback地址填写——
授权页面:
调用淘宝API 查询淘宝销售的商品
利用淘宝API 查看淘宝单个商品的详细页面。