voxforge.org
VoxForge Dev

Changeset 2368

Show
Ignore:
Timestamp:
12/03/07 22:45:23 (1 year ago)
Author:
kmaclean
Message:

SpeechSubmission server code snapshot

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Trunk/SpeechSubmission/VFSpeechSubmission/server/javaUploadServer.php

    r2366 r2368  
    5757$newname = $_FILES['userfile']['name']; 
    5858$newname =  ereg_replace  (  "\.zip"  , ""  , $newname  ); 
     59$newname =  ereg_replace  (  "[^a-zA-Z0-9_-]"  , ""  , $newname  ); 
    5960$newname = substr($newname , 0, 25); 
    60 $newname =  ereg_replace  (  "[^a-zA-Z0-9_-]"  , ""  , $newname  ); 
    6161 
    6262$ran = rand () ; 
     
    112112                echo "POSTLET:UNKNOWN ERROR\r\n"; 
    113113                echo "POSTLET:RETRY\r\n"; 
    114                print_r($_REQUEST); // Possible usefull for debugging 
     114//             print_r($_REQUEST); // Possibly useful for debugging 
    115115                echo "END POSTLET REPLY\r\n"; 
    116116                exit; 
  • Trunk/SpeechSubmission/VFSpeechSubmission/server/localSubmitSpeech.php

    r2366 r2368  
    66         
    77<body> 
    8  
    9 //!!!!!! only required for local testing */ 
    108<?php 
    119setcookie("user", "VoxForge", time()+3600); 
     
    1614 
    1715?> 
    18 //!!!!!! only required for local testing  
     16<?php 
     17require_once('localSubmitSpeechServer.php'); 
    1918 
    20 <?php 
    21 require_once('LocalSubmitSpeechServer.php'); 
    22  
    23 echo speex_postlet_applet( 
    24 'http://localhost:90/httpd/javaUploadServer.php',  
    25 'http://localhost:90/httpd/endpage.html', 
    26 'http://localhost:90/httpd/' 
    27      ); 
     19echo speex_postlet_applet(); 
    2820 
    2921?> 
  • Trunk/SpeechSubmission/VFSpeechSubmission/server/localSubmitSpeechServer.php

    r2366 r2368  
    1111 
    1212 
    13 function speex_postlet_applet($destination, $endpage,  $codebase,  $filefieldname='userfile'){ 
     13function speex_postlet_applet($filefieldname='userfile'){ 
    1414  global $CFG; 
     15//  $language = NL; 
     16//  $height = "950"; 
     17  $language = EN; 
     18  $height = "875"; 
     19 
    1520  $cookie = htmlspecialchars($_SERVER['HTTP_COOKIE']); 
    1621  $code =  <<<ENDHTMLFRAGMENT 
    17 <applet name="VoxForge.org Speech Submission Application" width ="825" height ="950" mayscript="mayscript" 
     22<applet name="VoxForge.org Speech Submission Application" width ="825" height =$height mayscript="mayscript" 
    1823      code="speechrecorder/RecorderApplet.class" style="border: 1px solid rgb(153,153,153);"> 
    19  <param name="codebase"  value="$codebase"/> 
     24 <param name="codebase"  value="http://localhost:90/httpd/"/> 
    2025 <param name="archive"  value="speechrecorder.jar"/> 
    2126 <param name="type"  value="application/x-java-applet;version=1.4"/> 
    2227 <param name="scriptable"  value="true"/> 
    23  <param name="destination" value="$destination"/> 
    24  <param name="endpage"  value="$endpage"/> 
     28 <param name="destination" value="http://localhost:90/httpd/javaUploadServer.php"/> 
     29 <param name="endpage"  value="http://localhost:90/httpd/endpage.html"/> 
    2530 <param name="cookie"  value="$cookie"/> 
    26  <param name="language"  value="NL"/> 
     31 <param name="language"  value=$language/> 
    2732<table style="background-color: rgb(255, 195, 1);" border="1" height="24" width="550"><tbody><tr><td> The VoxForge Speech Submission Applet should appear here. Please see the VoxForge <a href="http://www.voxforge.org/home/read2/java" color="ffffff">Java Troubleshooting Guide</a> to determine if you have Java installed on your PC - this is required in order to use the audio recorder.<br></td></tr></tbody></table> 
    2833