From: "Adam Williams" <[EMAIL PROTECTED]> > I was wondering if someone knew how to display the time on the server to a > web page that resides on that server, and have it update the time each > second? I was looking at javascript for this, but they all use the client > PC viewing the page to get the time, but I want it to display the server's > time. any suggestions on how to do this? Thanks!
You'll still need to use Javascript if you want the time actually updating in the browser. Try to find some js code that'll let you pass a "start" time to it. You can then get the server time with PHP and "pass" it to js. It may be a few seconds off, depending on the delay of getting the time on the server and the js actually starting in the browser, but close enough for govt. work. :) <? $now = time(); ?> <script language="javascript"> js_now = <?=$now?>; </script> Then use the "js_now" js variable as a starting point for the clock. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php