Hello friends:)

I have put this in my script to echo the current date and time:

    print strftime('%c');

And with this code:

    $p = $_SERVER['PHP_SELF'];
    $sec = "0.01";
    header("Refresh: $sec; url=$p");

tried to refresh the page in order to show a real clock, i mean a clock wich works well with no problem.
But the script refresh the page very fast without stopping and it doesn't sound good, for example the red circle on the tab that is orbiting so fast with unpleasent pusses because of loading, that's not good. Is there any other way to fix it?

3 Years
Discussion Span
Last Post by diafol

WHy do you need to do this? Everybody has a system clock don't they? DO you really need to show the time, which will, by the way probably be for your chosen timezone, not necessarily that of your users.

You can't do this with PHP anyway, it would be insane. You can mimic it with JS though. But pretty pointless.

Edited by diafol

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.