本文整理汇总了PHP中Securimage::outputAudioFile方法的典型用法代码示例。如果您正苦于以下问题:PHP Securimage::outputAudioFile方法的具体用法?PHP Securimage::outputAudioFile怎么用?PHP Securimage::outputAudioFile使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Securimage
的用法示例。
在下文中一共展示了Securimage::outputAudioFile方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: outputAudioFile
/**
*
*/
public function outputAudioFile()
{
/**
* @var $lng ilLanguage
*/
global $lng;
chdir(ilSecurImageUtil::getDirectory());
if ($lng->lang_key != 'en' && in_array($lng->lang_key, self::$supported_audio_languages)) {
$this->securimage->audio_path = $this->securimage->securimage_path . '/audio/' . $lng->lang_key . '/';
}
$this->securimage->outputAudioFile();
}
示例2: securimages_play
public function securimages_play()
{
$options = array('use_database' => true, 'database_name' => '', 'database_user' => '', 'database_driver' => Securimage::SI_DRIVER_MYSQL);
$img = new Securimage();
// Other audio settings
//$img->audio_use_sox = true;
//$img->audio_use_noise = true;
//$img->degrade_audio = false;
//$img->sox_binary_path = 'sox';
// To use an alternate language, uncomment the following and download the files from phpcaptcha.org
// $img->audio_path = $img->securimage_path . '/audio/es/';
// If you have more than one captcha on a page, one must use a custom namespace
// $img->namespace = 'form2';
// set namespace if supplied to script via HTTP GET
if (!empty($_GET['namespace'])) {
$img->setNamespace($_GET['namespace']);
}
return $img->outputAudioFile();
}
示例3: dirname
* 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 2012 Drew Phillips
* @author Drew Phillips <drew@drew-phillips.com>
* @version 3.5.2 (Feb 15, 2014)
* @package Securimage
*
*/
require_once dirname(__FILE__) . '/securimage.php';
// if using database, adjust these options as necessary and change $img = new Securimage(); to $img = new Securimage($options);
// see test.mysql.php or test.sqlite.php for examples
$options = array('use_database' => true, 'database_name' => '', 'database_user' => '', 'database_driver' => Securimage::SI_DRIVER_MYSQL);
$img = new Securimage();
// Other audio settings
//$img->audio_use_sox = true;
//$img->audio_use_noise = true;
//$img->degrade_audio = false;
//$img->sox_binary_path = 'sox';
// To use an alternate language, uncomment the following and download the files from phpcaptcha.org
// $img->audio_path = $img->securimage_path . '/audio/es/';
// If you have more than one captcha on a page, one must use a custom namespace
// $img->namespace = 'form2';
// set namespace if supplied to script via HTTP GET
if (!empty($_GET['namespace'])) {
$img->setNamespace($_GET['namespace']);
}
$img->outputAudioFile();
示例4: play
function play()
{
$phpcaptcha = new Securimage();
$phpcaptcha->outputAudioFile();
exit;
}
示例5: dirname
* @link http://www.phpcaptcha.org/latest.zip Download Latest Version
* @link http://www.phpcaptcha.org/Securimage_Docs/ Online Documentation
* @copyright 2012 Drew Phillips
* @author Drew Phillips <drew@drew-phillips.com>
* @version 3.5.2 (Feb 15, 2014)
* @package Securimage
*
*/
require_once dirname(__FILE__) . '/securimage.php';
// if using database, adjust these options as necessary and change $img = new Securimage(); to $img = new Securimage($options);
// see test.mysql.php or test.sqlite.php for examples
$options = array('use_database' => true, 'database_name' => '', 'database_user' => '', 'database_driver' => Securimage::SI_DRIVER_MYSQL);
$img = new Securimage();
// Other audio settings
//$img->audio_use_sox = true;
//$img->audio_use_noise = true;
//$img->degrade_audio = false;
//$img->sox_binary_path = 'sox';
//Securimage::$lame_binary_path = '/usr/bin/lame'; // for mp3 audio support
// To use an alternate language, uncomment the following and download the files from phpcaptcha.org
// $img->audio_path = $img->securimage_path . '/audio/es/';
// If you have more than one captcha on a page, one must use a custom namespace
// $img->namespace = 'form2';
// set namespace if supplied to script via HTTP GET
if (!empty($_GET['namespace'])) {
$img->setNamespace($_GET['namespace']);
}
// mp3 or wav format
$format = isset($_GET['format']) && strtolower($_GET['format']) == 'mp3' ? 'mp3' : null;
$img->outputAudioFile($format);
示例6: Securimage
<?php
require_once 'helpers/Captcha.class.php';
$image = new Securimage();
$image->outputAudioFile();