tylercd100 / server-status
1.1.0
2016-04-16 21:48 UTC
Requires
- php: ^5.5.9|^7.0
- geerlingguy/ping: ^1.0
- guzzlehttp/guzzle: ^6.2
Requires (Dev)
- phpunit/phpunit: ^4.8|^5.0
README
Can ping and return status code of a host
Installation
Install via composer - In the terminal:
composer require tylercd100/server-status
Usage
use Tylercd100\ServerStatus\Host; $host = new Host("google.com"); // or an IP address; 127.0.0.1 echo "Host ping: " . $host->ping() . "\n"; echo "Host status code: " . $host->status() . "\n"; # Host ping: 30.0 # Host status code: 200