Fixed Color Logic
This commit is contained in:
@@ -7,6 +7,22 @@ $timeout = 10; // timeout secondi per connessioni
|
||||
|
||||
// --- Helpers ---
|
||||
// Estrae hostname da domain (rimuove eventuali schema/port/path)
|
||||
|
||||
function ssl_days_left($expiry_date) {
|
||||
|
||||
if (empty($expiry_date)) return null;
|
||||
|
||||
$expiry = DateTime::createFromFormat('d/m/Y', $expiry_date);
|
||||
if (!$expiry) return null;
|
||||
|
||||
$now = new DateTime();
|
||||
|
||||
$interval = $now->diff($expiry);
|
||||
$days = (int)$interval->format('%r%a'); // giorni con segno
|
||||
|
||||
return $days;
|
||||
}
|
||||
|
||||
function normalizeDomainHost(string $domain): string {
|
||||
// rimuovi schema se presente
|
||||
if (preg_match('#^https?://#i', $domain)) {
|
||||
|
||||
Reference in New Issue
Block a user