PHP code example of yijie / open-taobao-sdk

1. Go to this page and download the library: Download yijie/open-taobao-sdk 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/ */

    

yijie / open-taobao-sdk example snippets




ao = new \Yijie\Taobao\Taobao(['key' => 'your-key', 'secret' => 'your-secret']);

// 使用如下
$taobao->request('method', $params);

// 例子
print_r($taobao->request('taobao.tbk.item.get', ['fields' => 'num_iid,title,pict_url,small_images,reserve_price,zk_final_price,user_type,provcity,item_url,seller_id,volume,nick', 'q' => '便利贴']));