PHP code example of alirezax5 / check-host
1. Go to this page and download the library: Download alirezax5/check-host library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
alirezax5 / check-host example snippets
ckHost = new \Alirezax5\CheckHost\CheckHost('1.1.1.1');
print_r($CheckHost->ping());
print_r($CheckHost->http());
print_r($CheckHost->dns());
print_r($CheckHost->tcp());
$CheckHost->node('ir1')->node('ir4');
ckHost = new \Alirezax5\CheckHost\CheckHost('1.1.1.1');
print_r($CheckHost->ping());
print_r($CheckHost->http());
print_r($CheckHost->dns());
print_r($CheckHost->tcp());
//some node
$CheckHost->node('ir1')->node('ir4');
print_r($CheckHost->ping());