1. Go to this page and download the library: Download yeardley/easytbk library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
yeardley / easytbk example snippets
use YearDley\EasyTBK\Factory;
use YearDley\EasyTBK\TaoBao\Request\TbkItemInfoGetRequest;
$client = Factory::taobao([
'app_key' => 'TAOBAO_APP_KEY',
'app_secret' => 'TAOBAO_APP_SECRET',
'format' => 'json'
]);
$req = new TbkItemInfoGetRequest;
$req->setNumIids('$numIids');
return $client->execute ($req);
use YearDley\EasyTBK\Factory;
use YearDley\EasyTBK\JingDong\Request\JdUnionGoodsPromotiongoodsinfoQueryRequest;
$jd = Factory::jingdong([
'app_key' => 'JD_APP_KEY',
'app_secret' => 'JD_APP_SECRET',
'format' => 'json',
]);
$req = new JdUnionGoodsPromotiongoodsinfoQueryRequest();
$req->setSkuIds('$itemid');
return $jd->execute($req);
use YearDley\EasyTBK\Factory;
use YearDley\EasyTBK\PinDuoDuo\Request\DdkGoodsDetailRequest;
$pdd = Factory::pinduoduo([
'client_id' => 'PDD_CLIENT_ID',
'client_secret' => 'PDD_CLIENT_SECRET',
'format' => 'json',
]);
$req = new DdkGoodsDetailRequest();
$req->setGoodsIdList('[$itemid]');
return $pdd->execute($req);