* File: securimage.php
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Any modifications to the library should be indicated clearly in the source code
* to inform users that the changes are not a part of the original software.
*
* If you found this script useful, please take a quick moment to rate it.
* http://www.hotscripts.com/rate/49400.html Thanks.
*
* @link http://www.phpcaptcha.org Securimage PHP CAPTCHA
* @link http://www.phpcaptcha.org/latest.zip Download Latest Version
* @link http://www.phpcaptcha.org/Securimage_Docs/ Online Documentation
* @copyright 2009 Drew Phillips
* @author drew010
* @version mchallis custom
* @package Securimage
*
*/
if ( isset($_GET['prefix']) && preg_match('/^[a-zA-Z0-9]{15,17}$/',$_GET['prefix']) ){
// no session
$prefix = $_GET['prefix'];
include 'securimage.php';
$img = new Securimage();
//set some settings
$img->nosession = true;
$img->prefix = $prefix;
$img->captcha_path = getcwd() . '/captcha-temp/';
//$img->audio_format = (isset($_GET['format']) && in_array(strtolower($_GET['format']), array('mp3', 'wav')) ? strtolower($_GET['format']) : 'mp3');
$img->audio_format = 'mp3';
}else {
// session
include 'securimage.php';
$img = new Securimage();
$img->form_id = 'com';
if( isset($_GET['si_form_id']) && in_array($_GET['si_form_id'], array('com', 'reg', 'log')) ) {
$img->form_id = $_GET['si_form_id'];
}
//$img->audio_format = (isset($_GET['format']) && in_array(strtolower($_GET['format']), array('mp3', 'wav')) ? strtolower($_GET['format']) : 'mp3');
$img->audio_format = 'mp3';
}
$img->outputAudioFile();
?>