Extract Ladill Servers as standalone app at servers.ladill.com.
VPS and dedicated server ordering, managed panels, SSO, billing, and launcher integration — forked from hosting infrastructure with server-focused routes and dashboard. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services\Ssl;
|
||||
|
||||
use Carbon\CarbonInterface;
|
||||
use Illuminate\Support\Carbon;
|
||||
|
||||
class SslCertificateExpiryParser
|
||||
{
|
||||
public function parseOpenSslEndDate(string $output): ?CarbonInterface
|
||||
{
|
||||
$line = trim($output);
|
||||
|
||||
if ($line === '') {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (str_contains($line, '=')) {
|
||||
$line = trim((string) strstr($line, '='));
|
||||
$line = ltrim($line, '=');
|
||||
}
|
||||
|
||||
try {
|
||||
return Carbon::parse($line);
|
||||
} catch (\Throwable) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user