Login   Register  
PHP Classes

File: index.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Jonathan Discipulo  >  World Time Class for PHP 5  >  index.php  >  Download  
File: index.php
Role: Example script
Content type: text/plain
Description: index.php
Class: World Time Class for PHP 5
Retrieve the current time from a NTP server
Author: By
Last change: updated sample file
Date: 3 years ago
Size: 592 bytes


Class file image Download


$time = new WorldTime();

if (
$time->query()) {
"<div style=font-family:Arial;font-size:12pt>";
"Time Server Host: <span style=color:#999>" $time->getHost() . "</span><br />";
"Time Server Port: <span style=color:#999>" $time->getPort() . "</span><br />";
"Result in epoch seconds: <span style=color:red>" $time->getResult() . "</span><br />";
"Today's date (UTC): <span style=color:#999>" date("M d Y, H:i:s"$time->getResult()) . "</span>";