2017 © Pedro Peláez
 

library ntp

PHP library for interacting with ntp servers

image

bt51/ntp

PHP library for interacting with ntp servers

  • Tuesday, May 13, 2014
  • by bt51
  • Repository
  • 1 Watchers
  • 10 Stars
  • 12,177 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 2 Versions
  • 11 % Grown

The README.md

# NTP

Package ntp is a simple NTP client. It supports NTP version 4 and SNTP. Note that this client currently does not take network delay into account. This means the time that is received will not be accurate to the nanosecond., (*1)

## Installation

Create a composer.json in your project, (*2)

{
    "require": {
        "bt51/ntp": "dev-master"
    }
}

Read more on composer here: http://getcomposer.org, (*3)

Usage

Getting the current time from an ntp server is simple., (*4)

``` php <?php, (*5)

use Bt51\NTP\Socket; use Bt51\NTP\Client;, (*6)

$socket = new Socket('0.pool.ntp.org', 123); $ntp = new Client($socket); $time = $ntp->getTime(); var_dump($time);, (*7)

```, (*8)

The current time returned from the ntp server will be converted to a DateTime object. The timezone will always be UTC., (*9)

License

MIT, (*10)

The Versions

13/05 2014

dev-master

9999999-dev https://github.com/bt51/ntp

PHP library for interacting with ntp servers

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

by Ben Tollakson

ntp ntp client network time protocol

13/05 2014

0.1.0

0.1.0.0 https://github.com/bt51/ntp

PHP library for interacting with ntp servers

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

by Ben Tollakson

ntp ntp client network time protocol