1. Go to this page and download the library: Download fangchaogang/uniontk 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/ */
fangchaogang / uniontk example snippets
use fangchaogang\uniontk\Factory;
use fangchaogang\uniontk\taobao\request\TbkItemInfoGetRequest;
$client = Factory::taobao ();
$req = new TbkItemInfoGetRequest;
$req->setNumIids ($numIids);
return $client->execute ($req);
use fangchaogang\uniontk\Factory;
use fangchaogang\uniontk\jingdong\request\JdUnionGoodsPromotiongoodsinfoQueryRequest;
$jd = Factory::jingdong();
$req = new JdUnionGoodsPromotiongoodsinfoQueryRequest();
$req->setSkuIds("$itemid");
return $jd->execute($req);
use fangchaogang\uniontk\Factory;
use fangchaogang\uniontk\pinduoduo\request\DdkGoodsDetailRequest;
$pdd = Factory::pinduoduo();
$req = new DdkGoodsDetailRequest();
$req->setGoodsIdList("[$itemid]");
return $pdd->execute($req);
use fangchaogang\uniontk\Factory;
use fangchaogang\uniontk\vip\request\PidGenRequest;
use fangchaogang\uniontk\vip\request\UnionPidServiceClient;
// 唯品会官方的sdk写的比较垃圾,用法和其他平台稍微不一样
$service= UnionPidServiceClient::getService();
Factory::vip();
$pidGenRequest1 = new PidGenRequest();
$pidNameList2 = array();
$pidNameList2[0] = "value";
$pidGenRequest1->pidNameList = $pidNameList2;
$pidGenRequest1->requestId = "requestId";
dd($service->genPidWithOauth($pidGenRequest1));
use fangchaogang\uniontk\Factory;
use fangchaogang\uniontk\suning\request\Netalliance\CouponproductQueryRequest;
$c = Factory::suning();
$req = new CouponproductQueryRequest();
$req->setPageNo("1");
$req->setPageSize("10");
$req->setPositionId("12");
$resp = $c->execute($req);
dd($resp);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.