PHP code example of tmarois / baseify-php-sdk

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

    

tmarois / baseify-php-sdk example snippets


$baseify = (new Baseify('YOUR_CLIENT_KEY'))->productSearch([
    'domain' => 'yourdomain.com'
]);

// set the users IP address
// This allows the API to return the proper results
$baseify->user()->set('ip',$testIp);

// set the user agent (also a 

// send in the query request
$results = $baseify->query('car chargers');

// get a list of all the products returned
$products = $results->getProducts();

// count how many products are returned
$products->count();

// get a list of the stores in the results
$stores = $results->getStores();

// get a list of the brands in the results
$brands = $results->getBrands();

// get a list of the brands in the results
$categories = $results->getCategories();