Jump to content

Recommended Posts

Posted

I am looking for a nice script to display the current time and date on my website. I am hoping to find something that can do the following:

 

1. display is dynamic and text based

2. streamlined and super fast to load

3. displays the time from one of the SNTP servers

 

So far the best I have found is this PHP script but it pulls the webservers time and the website I want to put this in is HTML not PHP and I am such a newb when it comes to PHP that I have not figured out how to include this PHP code into my HTML page.

 

><?php
$hourdiff = "3";
$timeadjust = ($hourdiff * 60 * 60);
$melbdate = date("l, d F Y h:i a",time() - $timeadjust);
print ("$melbdate");
?>

 

If anyone has found anything worth using please let me know

 

Thanks,

 

Dennis

Posted

If you add this line to your .htaccess file you will be able to include that script in your html page to display.

 

AddType application/x-httpd-php .htm .html

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...