WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDESPHP CLASSESCODE SEARCHARTICLES SEARCHPHP FORUMSPHP MANUALPHP FUNCTIONS LISTWEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search
Submit a code Example / Snippet Join us on FaceBook
Submit a code Example / Snippet Submit Your Code
Poker Tournaments Poker Tournaments
Poker Guide for Developers Poker Guide for Developers
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
Your Personal Examples List My Favorite Examples
Your Personal Articles List My Favorite Articles
Edit Account Info Update Your Profile
PHP Code Search
Web Development Forums
Learn MySQL Playing Trivia
PHPBB2 Templates
Web Development Resources
Web Development Content
Internet Security Software
PHPClasses
PHP Editor
PHP Jobs
Vision.To Design
Ajax Tutorials
PHP Programming Help
PHP/MySQL Programming
Webmaster Resources
Webmaster Forum
XML meta language
website builder
פרייסז - הכח לקנות עובר לידיים שלך
Texas Holdem Poker Evangelists

Go Back Add a Comment Send this example to a friend Add this Article to your personal favoritest for easy future access to your favorite Code Examples and Articles. Submit a code example Print this code example.
BACK ADD A COMMENT SEND TO A FRIEND ADD TO MY FAVORITES ADD CODE EXAMPLES PRINT
Title : This script obtains the current Universal Time from the National Institute of Standards and Technology of the United States of America.
Categories : PHP, Date Time Click here to Update Your Picture
Marcus Xenakis
Date : Sep 11th 1999
Grade : 5 of 5 (graded 1 times)
Viewed : 5598
File : utcnist.cgi
Images : No Images for this code example.
Search : More code by Marcus Xenakis
Action : Grade This Code Example
Tools : My Examples List

Submit your own code examples  Submit your own code examples 
 

#! /usr/bin/php
<?php
/*

Author - Marcus S. Xenakis 9/11/99
marcus@xenakis.net
Amateur Radio Callsign - WA2DCI

This script is distributed as-is under GNU public
license. Please leave the credit line in the script.

This script obtains the current Universal Time from
the National Institute of Standards and Technology
of the United States of America.

It can be used as ssi tag for an HTML page

<!--exec cgi="utcnist.cgi"-->

or and an include in another PHP script.
You many need to modify the first line for the path
to your PHP interpreter.

NOTICE: The time signals are corrected for network
propagation delays. You should select the time
server with the shortest network path to you.
Then modify the $site varible for that site.

For complete information on time servers see:
http://www.bldrdoc.gov/timefreq/service/nts.htm

*/

$site = "time-a.nist.gov";

$fp = fsockopen($site,13,&$errno,&$errstr);
if (!$fp) {
echo "Error Connecting to NIST\n";
} else {
$line = fread($fp,64);
fclose($fp);
$array = explode(" ",$line);
if ($array[5] == 4) {
echo "Error in NIST Time Signal\n";
} else {
echo substr($array[1],3);echo "-";
echo substr($array[1],0,2);echo "";
echo "$array[2]";
echo "UTC(NIST)\n";
}
}
?>




Calendar using Date function
Categories : HTML and PHP, PHP, Date Time, Calendar
A Timing Class
Categories : PHP, PHP Classes, Date Time
Simple function to return the number of days in a time span between 2 given dates.
Categories : PHP, Date Time, MySQL, Databases
Calendars to choose a range of dates , reservation events ...
Categories : PHP, Calendar, Java Script, Date Time
This code consists of two parts, the first part is a .html file that uses a form to pass 3 date variables into day_of_week.php3 You input the mm/dd/yyyy of the day then it prints what day of the week that day falls on.
Categories : Date Time, PHP, Complete Programs
Functions that will format a date in either long or short format from a string.
Categories : Date Time, Strings, PHP
This is a simple date function. Its converts the date to e.g. maandag 03 januari 2000. The date will be stored in the $date string.
Categories : PHP, Date Time
Calendar class on the same page , suitable for reservation
Categories : PHP, Calendar, Date Time
Count how many weeks in the month have a specified day, such as Mon, Tue, etc. Var avail - number of days - first day name of the month, occurrences of Sun, occurrences of Mon, etc. Allows you to calculate number of working hours exclude Holidays.
Categories : Calendar, Date Time, PHP, Databases, MySQL
Script loading time
Categories : PHP, Beginner Guides, Date Time
Simple graphic clock/watch generation using gd library.
Categories : Graphics, Date Time, PHP
CALENDAR - easy calendar-navigation with PHP
Categories : PHP, Date Time, HTML and PHP, Calendar
Simple conversion functions to change MySQL dates to arrays, arrays to MySQL dates.
Categories : PHP, Arrays, Date Time, Databases, MySQL
Change the background color of a website daily dynamically using the php date function to get the current day of the week and depending on that day, set the background color for the web page.
Categories : PHP, Date Time, Beginner Guides, Web Design
Checks Date-Input from HTML-Forms and converts to YYYY-MM-DD Format for MySQL Date-Fields
Categories : MySQL, Date Time, PHP, Databases