PHP Classes
elePHPant
Icontem

File: horloge.vxml.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Ben Yacoub Hatem  >  VXML  >  horloge.vxml.php  >  Download  
File: horloge.vxml.php
Role: Example script
Content type: text/plain
Description: Current time sample application using vxml
Class: VXML
generate easily VXML document
Author: By
Last change: Changed based on the version 1.0.1 of the php-vxml class
A Welcome message is added in the beginning of the application
Date: 12 years ago
Size: 1,397 bytes
 

Contents

Class file image Download
<?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();


?>