diff --git a/bbs/gcaptcha/gcaptcha.lib.php b/bbs/gcaptcha/gcaptcha.lib.php index a1b9af3a2..4f9bf841b 100644 --- a/bbs/gcaptcha/gcaptcha.lib.php +++ b/bbs/gcaptcha/gcaptcha.lib.php @@ -172,6 +172,7 @@ function captcha_html($class='captcha') $obj = new gcaptcha(); $obj->run(); + $rand = rand(); $jpg_file_url = G4_DATA_URL.'/cache/'.$obj->captcha_filename.'.jpg'; $wav_file_url = G4_DATA_URL.'/cache/'.$obj->captcha_filename.'.wav'; @@ -179,8 +180,8 @@ function captcha_html($class='captcha') $html .= PHP_EOL.''; $html .= '
'; diff --git a/bbs/gcaptcha/wav.php b/bbs/gcaptcha/wav.php deleted file mode 100644 index f45405a9e..000000000 --- a/bbs/gcaptcha/wav.php +++ /dev/null @@ -1,74 +0,0 @@ - 16){ - $header .= fread($fp,($info['Subchunk1Size']-16)); - } - - // read SubChunk2ID - $header .= fread($fp,4); - - // read Subchunk2Size - $size = unpack('vsize',fread($fp, 4)); - $size = $size['size']; - - // read data - $data .= fread($fp,$size); - } - - return '' - .pack('a4', 'RIFF') - .pack('V', strlen($data) + 36) - .pack('a4', 'WAVE') - .pack('a4', 'fmt ') - .pack('V', $info['Subchunk1Size']) // 16 - .pack('v', $info['AudioFormat']) // 1 - .pack('v', $info['NumChannels']) // 1 - .pack('V', $info['SampleRate']) // 8000 - .pack('V', $info['ByteRate']) // 8000 - .pack('v', $info['BlockAlign']) // 1 - .pack('v', $info['BitsPerSample']) // 8 - .pack('a4', 'data') - .pack('V', strlen($data)) - .$data; -} -?>