Merge branch 'master' of github.com:gnuboard/g4s
This commit is contained in:
@ -2,8 +2,8 @@
|
|||||||
include_once("./_common.php");
|
include_once("./_common.php");
|
||||||
|
|
||||||
// prepare an array of wavfiles
|
// prepare an array of wavfiles
|
||||||
$lc ='/home/tmp/g4s/plugin/captcha/wavs/';
|
$wavs_dir = $g4['path'].'/plugin/captcha/wavs/';
|
||||||
$wav = $lc.'captcha.wav';
|
$wav = $wavs_dir.'0.wav';
|
||||||
|
|
||||||
$fields = join('/',array( 'H8ChunkID', 'VChunkSize', 'H8Format',
|
$fields = join('/',array( 'H8ChunkID', 'VChunkSize', 'H8Format',
|
||||||
'H8Subchunk1ID', 'VSubchunk1Size',
|
'H8Subchunk1ID', 'VSubchunk1Size',
|
||||||
|
|||||||
@ -2,25 +2,14 @@
|
|||||||
include_once("./_common.php");
|
include_once("./_common.php");
|
||||||
|
|
||||||
// prepare an array of wavfiles
|
// prepare an array of wavfiles
|
||||||
$lc ='/home/tmp/g4s/plugin/captcha/wavs/';
|
$wavs_dir = $g4['path'].'/plugin/captcha/wavs/';
|
||||||
$number = (string)$_SESSION['ss_captcha_key'];
|
$number = (string)$_SESSION['ss_captcha_key'];
|
||||||
$wavs = array();
|
$wavs = array();
|
||||||
for($i=0;$i<strlen($number);$i++){
|
for($i=0;$i<strlen($number);$i++){
|
||||||
$file = $lc.$number[$i].'.wav';
|
$file = $wavs_dir.$number[$i].'.wav';
|
||||||
//echo $file;
|
|
||||||
if(!@file_exists($file)) {
|
|
||||||
$file = $en.$code{$i}.'.wav';
|
|
||||||
}
|
|
||||||
$wavs[] = $file;
|
$wavs[] = $file;
|
||||||
/*
|
|
||||||
for ($d=0;$d<rand(0,5);$d++) {
|
|
||||||
$wavs[] = $lc.'delay'.rand(0,1).'.wav';
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//print_r($wavs); exit;
|
|
||||||
|
|
||||||
header('Content-type: audio/x-wav');
|
header('Content-type: audio/x-wav');
|
||||||
header('Content-Disposition: attachment;filename=captcha.wav');
|
header('Content-Disposition: attachment;filename=captcha.wav');
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user