PHP code example of shjia / taobao_spider

1. Go to this page and download the library: Download shjia/taobao_spider 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/ */

    

shjia / taobao_spider example snippets



Ezspider\spider;

$importModel = new \Ezspider\spider;

$importModel->setItemId('569643840385');
if(empty($importModel->initGoodsPlatform())){
    return;
}

$params['name'] = $importModel->getGoodsTitle();
$params['image'] = $importModel->getPreviewImg();
$params['detail'] = $importModel->getDetails();


print_r($params);