PHP code example of bt51 / ntp
1. Go to this page and download the library: Download bt51/ntp 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/ */
bt51 / ntp example snippets
php
use Bt51\NTP\Socket;
use Bt51\NTP\Client;
$socket = new Socket('0.pool.ntp.org', 123);
$ntp = new Client($socket);
$time = $ntp->getTime();
var_dump($time);