| 
<?php
////////////////////////////////////////////////////////////////////
 ///
 ///             Sample usage of vxml.class.php
 ///                  Exemple de l'Horloge parlante
 ///
 ////////////////////////////////////////////////////////////////////
 
 include ("vxml.class.php");
 
 $vxml_object=new voicexml;
 
 $vxml_object->start_vxml_header($lang="fr");
 
 $vxml_object->vxml_start_property("caching","safe");
 
 // Welcome message
 $vxml_object->welcome("Bienvenu sur le service de l'horlange parlante.", "horloge");
 
 
 // Form de l'horloge
 
 $vxml_object->vxml_start_form("horloge");
 
 $vxml_object->vxml_start_block();
 
 $vxml_object->vxml_start_script();
 
 $vxml_object->addscript( "
 function horlogeparlante()
 {
 var heure;
 heure= \"Il est maintenant : \"+now.getHours()+\" heures \"+ now.getMinutes() +\" minutes et
 
 \"+now.getSeconds()+\" secondes.\";
 return heure;
 }");
 
 $vxml_object->end_vxml_script();
 
 $vxml_object->vxml_start_prompt("","","","3");
 
 $vxml_object->vxml_start_value("horlogeparlante()");
 
 $vxml_object->end_vxml_prompt();
 
 $vxml_object->vxml_start_break("3");
 
 $vxml_object->vxml_reprompt();
 
 $vxml_object->end_vxml_block();
 
 $vxml_object->end_vxml_form();
 
 $vxml_object->end_vxml();
 
 $vxml_object->generate();
 
 
 ?>
 |