PHP code example of sdv / ibp-sdk-php

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

    

sdv / ibp-sdk-php example snippets


composer 

try {
    $folders = $ibp->setApplicationId('APPLICATION-ID')
        ->setApplicationToken('APPLICATION-TOKEN')
        ->folders();
} catch (ApiException $e) {
    /** @var Ibp\Resources\Error */
    var_dump($e->error);
}

$token = $ibp
    ->setApplicationId('app_id')
    ->setApplicationSecret('app_secret')
    ->applicationToken();

$files = $ibp->files();

$file = $ibp->file('59142cd4a64da6014c769813');

$file = $ibp->TagFile('59142cd4a64da6014c769813', 'manual', ['tag 1', 'tag 2']);

$fileContent = fopen(__DIR__. '/README.md', 'r');
$file = $ibp->uploadFile($fileContent);