Long time lurker, first time asker. This task seems relatively straightforward: create a VoiceXML doc that will trigger a script to change a text document to then run a game via verbal commands.
Relevant VoiceXML:
<!--Encoding details-->
<?xml version="1.0" encoding="UTF-8" ?>
<vxml version="2.1" xmlns="http://www.w3.org/2001/vxml">
<if cond="command =='t1 go'">
<submit next="tank.php?command=t1%20go" method="get" namelist="command"/>
</if>
There are 5 conditions total below the initial one in if/else tags. When the phone # is called it asks you to give your command, it correctly goes to the conditional branch and then states that the tank.php document "can't be compiled" and disconnects. The trick is that the text file has indeed been changed by this verbal command and the php compiles/runs fine. When I take out the 'submit' tag, the document throws no errors. For whatever reason this 'compilation error' from the php seems to be causing the voiceXML form to prematurely disconnect.
Complete php document:
<?php
$myfile = fopen("gismoCommand.txt", "w") or die("Unable to open file!");
$command = $_GET["command"];
fwrite($myfile, $command);
fclose($myfile);
?>
I've been working on this specific issue for 5 hours. Your suggestion could save my sanity.