1. Go to this page and download the library: Download andygrn/aquarius 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/ */
andygrn / aquarius example snippets
// A simple greeting and visit counter.
$app = new aquarius\App();
$app->addHandler('/', function ($request, $response) {
$remote_user = $request->getRemoteUser();
if ('' === $remote_user) {
$remote_user = 'stranger';
}
$response->appendBody("Hello, $remote_user.\n\n");
if (PHP_SESSION_ACTIVE === session_status()) {
if (!isset($_SESSION['visit_count'])) {
$_SESSION['visit_count'] = 0;
}
++$_SESSION['visit_count'];
$response->appendBody("You've been here {$_SESSION['visit_count']} times.");
}
return $response;
});
$app->run();
// Forcing a session (i.e. a client certificate) with middleware.
$app = new aquarius\App();
function ::STATUS_CLIENT_CERTIFICATE_REQUIRED,
'Certificate sponse->setBody('Members only 😎');
return $this->next($request, $response);
})
->butFirst('
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.