I am developing an handwriting recog tool for android and I have planned to use a server for this purpose. I will be getting data from the android interface and send it to the server where it’s stored in a file. I have a toolkit written in c which I will be using and I have to execute a few commands which will have text files as its parameters.
An example of a command:
HVite -A -D -T 1 -H C:\htk\model\hmm0\Single.mmf -i C:\htk\data\train\lab\1.mlf -w C:\htk\def\net.slf C:\htk\def\dict.txt C:\htk\model\hmm0\hmmlist.txt C:\htk\data\train\user\h1.txt
Where single.mmf, 1.mlf, net.slf, hmmlist.txt are the parameters to the command hvite. Is there a way to execute such commands on server and if yes what are the proposed solutions?
Secondly is sending data from android to the server and then doing all the processing on the server side a good choice? I would have to post the result back to android as well.
Try this command http://www.php.net/manual/en/function.pcntl-exec.php and notice that “Executes specified program in current process space” – this limits your program and on the other hand gives you safe environment. You may also want to look at this list http://php.net/manual/en/book.exec.php