squareconcepts/uptime-monitor

checks if a website is online and if it has an ssl certificate

1.0.12 2022-10-21 08:19 UTC

This package is auto-updated.

Last update: 2024-10-21 12:33:24 UTC


README

Usage

// Usage description here
    $uptimeMonitor = \Squareconcepts\UptimeMonitor\UptimeMonitor::make('https://www.google.com');
    
    if($uptimeMonitor->isHasSsl()) {
        echo 'I\'m secure!';
    } else {
        echo 'Oops, I\'m not secure!'
    }

    if($uptimeMonitor->isOnline()) {
        echo 'I\'m online!';
    } else {
        echo 'Oops, I\'m offline!'
    }
    
    echo $uptimeMonitor->expiresIn(); // 20 days from now
   

If you'd like to have a number in stead of the string

    $months = $uptimeMonitor->expiresIn('months');
    $weeks = $uptimeMonitor->expiresIn('weeks');
    $days = $uptimeMonitor->expiresIn('days');
    $hours = $uptimeMonitor->expiresIn('hours');
    $minutes = $uptimeMonitor->expiresIn('minutes');
    $seconds = $uptimeMonitor->expiresIn('seconds');

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Security

If you discover any security related issues, please email arthur@squareconcepts.nl instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.