title: PHP daily countdown timer server side
body: <p>I have a question about a php code i took from an answer:
  <a href="https://stackoverflow.com/questions/17733345/timer-timezone-server-side-time-client-side-countdown">Timer, timezone, server side time, client side countdown</a>
  I modified the php code for my own usages:</p>
  
  <pre><code>$now = new DateTime;
  $Boss1 = new DateTime('07:50');
  $Boss2 = new DateTime('11:50');
  $Boss3 = new DateTime('23:50');
  // next time is night
  if( $now &gt; $Boss1 &amp;&amp; $now &lt; $Boss2)
  {
      $time = $now-&gt;diff($Boss2);
  } 
  // next time is day
  else
  if( $now &gt; $Boss2 &amp;&amp; $now &lt; $Boss3) 
  {
      $time = $now-&gt;diff($Boss3);
  
  }
  else 
  {
      $time = $now-&gt;diff($Boss1);
  
  }
  
  $target = $time-&gt;format('%h:%i:%s');
  echo "&lt;b&gt;Next Boss Fight:&lt;/b&gt; " . $target;
  </code></pre>
  
  <p>At this moment, he only goes down in time when you refresh the page.
  Here can you have a look on the page (it is for mobile use):
  <a href="http://www.novalirium.com/river" rel="nofollow noreferrer">My Website</a>
  Only now i wondering, how do i let it countdown without refreshing the page?</p>