PHPackages                             viirre/urlchecker - 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. viirre/urlchecker

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

viirre/urlchecker
=================

Simple utility package to check the status of a URL (status code, response time etc).

v0.3(8y ago)02.8k1MITPHPPHP &gt;=7.0

Since Apr 17Pushed 7y agoCompare

[ Source](https://github.com/viirre/urlchecker)[ Packagist](https://packagist.org/packages/viirre/urlchecker)[ Docs](https://github.com/viirre/urlchecker)[ RSS](/packages/viirre-urlchecker/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (5)Used By (0)

urlchecker
==========

[](#urlchecker)

[![Latest Version](https://camo.githubusercontent.com/9c5720590ef7c7b12eaa7f48f0ec1a18269f329810c3b8657e1661e953f40fbc/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f7669697272652f75726c636865636b65722e7376673f7374796c653d666c61742d737175617265)](https://github.com/viirre/urlchecker/releases)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/a4f36a3ee75ec40343dd44b46ebc1c2a54cc00a5e0ce42d047d8332138588f47/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f7669697272652f75726c636865636b65722f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/viirre/urlchecker)

[![Quality Score](https://camo.githubusercontent.com/616e674957ab19fcdd54221dc149fc0280de989f6222055534be299b9ab1ff67/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f7669697272652f75726c636865636b65722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/viirre/urlchecker)

This package let's you check the status of a URL to easily check if it's "online" or not. Uses PSR 1/2. It uses Guzzle for communicating with the URLs.

Install
-------

[](#install)

Via Composer

```
$ composer require viirre/urlchecker
```

Usage
-----

[](#usage)

```
require_once 'vendor/autoload.php';

$url = 'http://www.google.com';
$checker = new \Viirre\UrlChecker\Checker();
$status = $checker->check($url);

if ($status->isRespondingOk()) {
    echo "Url {$url} is responding ok, woho!";
} elseif ($status->isRespondingButNotOk()) {
    echo "Url {$url} is responding, but with status code: " . $status->getStatusCode() . " and reason for not a 200: " . $status->getReason();
} elseif ($status->isNotResponding()) {
    echo "Url {$url} is NOT responding ok, fail reason: " . $status->getReason();
}
```

There are plenty of stuff to check about the connection, to get how long the connection took, use:

```
$timeInSeconds = $status->getTimeInSeconds();
$timeInMilliSeconds = $status->getTimeInMilliSeconds();
```

And if you want to drill down further, you can access the underlying GuzzleHttp\\Message\\Response object to access all it's info, eg:

```
$response = $status->getResponse();

// Get protocol info from the response
$protocol = $response->getProtocolVersion();
```

Checkout the Guzzle Response class with all the available functions at [Guzzles API](http://api.guzzlephp.org/class-Guzzle.Http.Message.Response.html)

Testing
-------

[](#testing)

```
$ phpunit
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](https://github.com/viirre/urlchecker/blob/master/CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [Victor Schelin](https://github.com/viirre)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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.

###  Release Activity

Cadence

Every ~509 days

Total

3

Last Release

3030d ago

PHP version history (3 changes)v0.1PHP &gt;=5.4.0

v0.2PHP &gt;=5.5.0

v0.3PHP &gt;=7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/609a88f1fe8b2ea8e3cf19442e3e2953a4c1376960c066d15343bd1d535341e5?d=identicon)[viirre](/maintainers/viirre)

---

Top Contributors

[![viirre](https://avatars.githubusercontent.com/u/697468?v=4)](https://github.com/viirre "viirre (19 commits)")

---

Tags

viirreurlcheckercheck url status

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/viirre-urlchecker/health.svg)

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

###  Alternatives

[shlinkio/shlink

A self-hosted and PHP-based URL shortener application with CLI and REST interfaces

4.8k4.3k](/packages/shlinkio-shlink)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[dhlparcel/magento2-plugin

DHL Parcel plugin for Magento 2

11180.5k2](/packages/dhlparcel-magento2-plugin)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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