note 68049 deleted from function.getdate by nlopess
| From: | nlopess@php.net | Date: | Thu, 13 Jul 2006 19:45:26 +0000 |
| Subject: | note 68049 deleted from function.getdate by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-114761@lists.php.net to get a copy of this message | ||
Note Submitter: cwillard at chriswillarddesign dot com
----
Well I thought it wouldn't be possible to make a live clock using only php due to the fact that
it is a refresh only language. Well I figured out a little something simple, if you take a look
here: www.chriswillarddesign.com/testscripts/live/
that is a dyanamic php only clock that is retrieving it's variables using the getdate()
function. There is a couple problems with this method of doing it however and I've attempted
to address these issues. Number one is obvious, the code would have to be included into a iframe or
div tag due to the sleep tag usage if you plan on having other dynamic content going on at the same
time. The other is as you've noticed if you right click and view source there is a lot of span
tags. In the code after a certain number of span tags are created it automatically refreshes the
page to prevent size issues. I am using this script in a game project I am working on just thought
it was pretty cool and thought I would share.