PHPackages                             phizzl/uptimetools - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. phizzl/uptimetools

AbandonedArchivedLibrary[Utility &amp; Helpers](/categories/utility)

phizzl/uptimetools
==================

49PHP

Since May 24Pushed 9y ago1 watchersCompare

[ Source](https://github.com/phizzl/php-uptimetools)[ Packagist](https://packagist.org/packages/phizzl/uptimetools)[ RSS](/packages/phizzl-uptimetools/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

PHP uptime tools
================

[](#php-uptime-tools)

This library should help to provide information about uptimes of network services with PHP.

Checks
------

[](#checks)

There are different kind of checks implemented.

### HTTP(S) keyword

[](#https-keyword)

This checks requests a given HTTP(S) resource and checks it for a list of keywords. Since it checks the plain any return value can be checked.

```
use Phizzl\UptimeTools\Checks\CheckFactory;

$checkFactory = new CheckFactory();
$check = $checkFactory->create(CheckFactory::TYPE_HTTPKEYWORDS, [
    'host' => 'https://www.heise.de',
    'keywords' => ['heise online Themen', 'heise Security', '']
]);
```

### Ping checks

[](#ping-checks)

Ping check is sending one ping to a given host.

```
use Phizzl\UptimeTools\Checks\CheckFactory;

$checkFactory = new CheckFactory();
$check = $checkFactory->create(CheckFactory::TYPE_PING, [
    'host' => 'www.gitub.com'
]);
```

### TCP port check

[](#tcp-port-check)

You may check wether a given TCP port is open on a defined host or not.

```
use Phizzl\UptimeTools\Checks\CheckFactory;

$checkFactory = new CheckFactory();
$check = $checkFactory->create(CheckFactory::TYPE_TCP, [
    'host' => 'www.github.com',
    'port' => 80
]);
```

Buckets
-------

[](#buckets)

To execute the checks they need to added to a bucket. A bucket can euqal your application. For example a Webserver. You may want to test if it's pingable, the TCP port 80 is open and you find the closing HTML tag on your index.

```
use Phizzl\UptimeTools\Buckets\Bucket;
use Phizzl\UptimeTools\Buckets\DispatchedBucket;
use Phizzl\UptimeTools\Checks\CheckFactory;
use Phizzl\UptimeTools\Checks\DispatchedCheck;

$bucket = new Bucket();
$checkFactory = new CheckFactory();

$bucket->getChecks()->addCheck($checkFactory->create(CheckFactory::TYPE_TCP, [
    'host' => 'www.mywebsite.local',
    'port' => 80
]));

$bucket->getChecks()->addCheck($checkFactory->create(CheckFactory::TYPE_HTTPKEYWORDS, [
    'host' => 'http://www.mywebsite.local',
    'keywords' => ['']
]));

$bucket->getChecks()->addCheck($checkFactory->create(CheckFactory::TYPE_PING, [
    'host' => 'www.mywebsite.local'
]));

$dispatchedBucket = $bucket->run();

echo "Checks took {$dispatchedBucket->getDispatchTime()}s\n";
echo "--------------------------------------\n";
/* @var DispatchedCheck $dispatchedCheck */
foreach($dispatchedBucket->getSucceededDispatchedChecks() as $dispatchedCheck){
    echo "Success: " . get_class($dispatchedCheck->getContext()->getCheck()) . PHP_EOL;
    echo "Executed in: {$dispatchedCheck->getDispatchTime()}s\n";
    echo "--------------------------------------\n";
}

/* @var DispatchedCheck $dispatchedCheck */
foreach($dispatchedBucket->getFailedDispatchedChecks() as $dispatchedCheck){
    echo "Failed: " . get_class($dispatchedCheck->getContext()->getCheck()) . PHP_EOL;
    echo "Executed in: {$dispatchedCheck->getDispatchTime()}s\n";
    echo "Message: {$dispatchedCheck->getMessage()}\n";
    echo "--------------------------------------\n";
}

if($dispatchedBucket->getStatus() === DispatchedBucket::STATUS_SUCCESS){
    echo "All checks passed!\n";
    exit(0);
}
else{
    echo "Error occured!\n";
    exit(1);
}
```

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/9c97e3bef66ef0074ad9f0fe89d74a6bec22b2940cf11f4cb41707e15c316589?d=identicon)[phizzl](/maintainers/phizzl)

### Embed Badge

![Health badge](/badges/phizzl-uptimetools/health.svg)

```
[![Health](https://phpackages.com/badges/phizzl-uptimetools/health.svg)](https://phpackages.com/packages/phizzl-uptimetools)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
