How to make javascript execute a php file : <p>In where do i add when the timer gets to 0 it exectues a php file for example joined.php and how would i make it so that it also counts days</p>

<pre><code>    &lt;script&gt;
var myreset = [21,37,00]; // at what time to reset - 19:40:00

var mycountdown = startCountdown();

function startCountdown(){
    var enddate = calculateEndDate();
  return setInterval(function(){tickTock(calculateStartDate(),enddate)}, 1000);
}
function calculateStartDate(){ //this needs to be edited if using the server time
    return new Date();
}
function calculateEndDate(){
    var enddate = new Date();
    enddate.setHours(myreset[0]);
    enddate.setMinutes(myreset[1]);
    enddate.setSeconds(myreset[2]);
    return enddate;
}
function tickTock(startdate, enddate){
  var diff = enddate.getTime() - startdate.getTime(); 
  d = diff &gt;= 0 ? diff : diff + 24*3600*1000;
  var h = Math.floor(d / 3600 / 1000);
  var m = Math.floor(d / 60 / 1000) - 60*h; 
  var s = Math.floor(d / 1000) - 3600*h - 60*m; 
  printCountdown(h,m,s);
}
function pluralize(word,count){
      return (count &gt; 1) ? word+'s ' : word+' ';
}
function printCountdown(h,m,s){
  var t = h + pluralize(' hour',h)+ m+pluralize(' minute',m)+ s + pluralize(' and second',s);
  $('#mycountdown').html(t); 
}
&lt;/script&gt; 
</code></pre>
