1. Go to this page and download the library: Download hamrocdn/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/ */
hamrocdn / sdk example snippets
use HamroCDN\HamroCDN;
$cdn = new HamroCDN('your-api-key');
use HamroCDN\HamroCDN;
$cdn = new HamroCDN('your-api-key');
// Upload a file
$upload = $cdn->upload('/path/to/image.jpg');
echo "Uploaded: " . $upload->getOriginal()->getUrl() . PHP_EOL;
// Fetch it again
$fetched = $cdn->fetch($upload->getNanoId());
echo "Fetched: " . $fetched->getOriginal()->getUrl() . PHP_EOL;