1. Go to this page and download the library: Download shardimage/shardimage-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/ */
shardimage / shardimage-php example snippets
use shardimage\shardimagephp\auth\Client;
$client = new Client([
'apiKey' => '<apiKey>', //key to use the API or the image serving
'apiSecret' => '<apiSecret>', //secret to use the API
'imageSecret' => '<imageSecret>', //secret to gain more security on image serving
'cloudId' => '<cloudId>', //default configuration for cloud ID, it can be overwritten in later usage
]);
use shardimage\shardimagephp\models\cloud\IndexParams;
$indexParams = new IndexParams();
$indexParams->nextPageToken = 0;
$indexParams->projections = [ //with projections parameter, we have the chance to narrow down the returning data.
IndexParams::PROJECTION_NO_BACKUP,
IndexParams::PROJECTION_NO_FIREWALL,
];
$response = $client->getCloudService()->index($indexParams);