PHP code example of luklewluk / mylittleping

1. Go to this page and download the library: Download luklewluk/mylittleping 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/ */

    

luklewluk / mylittleping example snippets


// Create object instances
$config = new Config();
$connection = new Socket($config);
$ping = new Ping($connection, $config);
// Send request
echo $ping->send('google.com') . PHP_EOL;

$ping = Ping::createWithConnection(Socket::class);
echo $ping->send('google.com') . PHP_EOL;