1. Go to this page and download the library: Download eveltic/cookie-bundle 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/ */
eveltic / cookie-bundle example snippets
$consent = $cookieConsentService->getConsent();
if ($consent) {
// Process the consent data
} else {
// Handle the case where no consent has been given
}
if ($cookieConsentService->hasConsented()) {
// User has already consented
} else {
// Show consent banner or take appropriate action
}
if ($cookieConsentService->isCategoryAccepted('analytics')) {
// Load analytics scripts or perform actions that