Skip to content
Easy Ping Helper for PHP.
PHP
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
tests
.editorconfig
.gitattributes
.gitignore
.travis.yml
LICENSE
README.md
composer.json
phpunit.xml.dist
renovate.json

README.md

Ping

Build Status PHP from Packagist Latest Version License

Composer

Require this package, with Composer, in the root directory of your project.

$ composer require faustbrian/ping

Usage

<?php

$ping = new BrianFaust\Ping\Ping();
$latency = $ping
    ->host("127.0.0.1")
    ->port(80)
    ->driver('tcp')
    ->ping();

if ($latency) {
    dd("Latency is {$latency}ms");
} else {
    dd("Host [{$host}] seems to be down.");
}

Testing

$ phpunit

Security

If you discover a security vulnerability within this package, please send an e-mail to hello@basecode.sh. All security vulnerabilities will be promptly addressed.

Credits

License

MIT © Brian Faust

You can’t perform that action at this time.