PHP code example of hedii / uptime-checker
1. Go to this page and download the library: Download hedii/uptime-checker 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/ */
hedii / uptime-checker example snippets
// /path/to/vendor/autoload.php';
// instantiate
$checker = new Hedii\UptimeChecker\UptimeChecker();
// instantiate with the http client as a parameter
$checker = new Hedii\UptimeChecker\UptimeChecker(new Client([
'delay' => 1000,
'allow_redirects' => false
]));
$checker = new Hedii\UptimeChecker\UptimeChecker();
$result = $checker->check('http://example.com');