tylercd100/server-status

1.1.0 2016-04-16 21:48 UTC

This package is auto-updated.

Last update: 2024-09-12 09:49:04 UTC


README

Latest Version Software License Build Status Scrutinizer Code Quality Code Coverage Dependency Status Total Downloads

可以ping主机并返回状态码

安装

通过 composer 安装 - 在终端中

composer require tylercd100/server-status

用法

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