PHP Classes
elePHPant
Icontem

File: ajax.php

Recommend this page to a friend!
  Classes of zinsou A.A.E.MoÔse  >  PHP Realtime Clock  >  ajax.php  >  Download  
File: ajax.php
Role: Auxiliary script
Content type: text/plain
Description: ajax file
Class: PHP Realtime Clock
Display clock or timer updated in real time
Author: By
Last change:
Date: 4 months ago
Size: 426 bytes
 

Contents

Class file image Download
<?php
session_start
();
    if(!isset(
$_SESSION['time'])){
       
$_SESSION['time']=array($_GET['hour'],$_GET['minute'],$_GET['segund']);
    }else{
       
$duree=$_GET['hour']*3600+$_GET['minute']*60+$_GET['segund'];
       
$session=intval($_SESSION['time'][0])*3600+intval($_SESSION['time'][1])*60+intval($_SESSION['time'][2]);
        if(
$session<$duree){
           
$_SESSION['time']=array($_GET['hour'],$_GET['minute'],$_GET['segund']);
        }
    }
?>