1. Go to this page and download the library: Download livetyping/hermitage 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/ */
$sources = new \livetyping\hermitage\app\Sources([
// path to your config
__DIR__ . '/../config/main.php',
]);
// load environment variables from the `.env` file if it exists
livetyping\hermitage\bootstrap\load_dotenv(dirname(__DIR__));
livetyping\hermitage\bootstrap\app($sources)->run();
$timestamp = (new DateTime('now', new DateTimeZone('UTC')))->getTimestamp();
$filename = '<filename>';
$secret = '<secret value>';
$method = 'DELETE';
// The URI
$uri = "http://hermitage/{$filename}";
// Data for the hash
$data = implode('|', [$method, $uri, $timestamp]);
// Generate the signature
$signature = hash_hmac('sha256', $data, $secret);
// Request the uri
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => $url,
CURLOPT_CUSTOMREQUEST => $method,
CURLOPT_HTTPHEADER => [
'X-Authenticate-Timestamp' => $timestamp,
'X-Authenticate-Signature' => $signature,
],
]);
curl_exec($ch);
curl_close($ch);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.