| Current Path : /var/www/magento.test.indacotrentino.com/www/scripts/tools/ |
| Current File : /var/www/magento.test.indacotrentino.com/www/scripts/tools/iubendaCreateLegalNotice.php |
<?php
$legalNotice = [
[
"identifier" => "privacy_policy",
"content" => "Privacy policy del 2022-10-01",
"timestamp" => "2022-10-01T00:00:00Z"
],
[
"identifier" => "cookie_policy",
"content" => "Cookie policy del 2022-10-01",
"timestamp" => "2022-10-01T00:00:00Z"
],
[
"identifier" => "terms",
"content" => "Terms del 2022-10-01",
"timestamp" => "2022-10-01T00:00:00Z"
]
];
$req = curl_init();
curl_setopt($req, CURLOPT_URL, 'https://consent.iubenda.com/legal_notices');
curl_setopt($req, CURLOPT_RETURNTRANSFER, true);
curl_setopt($req, CURLOPT_HTTPHEADER, array(
'ApiKey: MIMKEgxQw0kpGwldWMDSSQb5fmUr9GpI',
'Content-Type: application/json'
));
curl_setopt($req, CURLOPT_POST, true);
curl_setopt($req, CURLOPT_POSTFIELDS, json_encode($legalNotice));
$response = curl_exec($req);
echo var_dump (json_decode($response));