and like us on FB

A time server is a computer server that reads the precise time from a reference source and distributes this information to various clients. The most widely used protocol for distributing and synchronising time over the Internet is the Network Time Protocol (NTP), though other less-popular or outdated time protocols continue to be in use.

Your time can be synced to any number of NTP servers for the purpose of updating your own system time or querying it for another use. While most UNIX-based servers will support synchronising by default – many don’t… and some other smaller servers may not provide that feature at all. This PHP function is a means of obtaining a GPS-accurate time when other methods fail you.

Query Time from a NTP Server with PHP

Pictured: Windows has supported NTP updating since Windows 2000

You can choose any number of NTP servers to sync to here .

The PHP Function


Download: PHP Code (V)

Shortt URL for this post: