本文整理汇总了PHP中Securimage::getAudibleCode方法的典型用法代码示例。如果您正苦于以下问题:PHP Securimage::getAudibleCode方法的具体用法?PHP Securimage::getAudibleCode怎么用?PHP Securimage::getAudibleCode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Securimage
的用法示例。
在下文中一共展示了Securimage::getAudibleCode方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Securimage
<?php
$_user_location = 'public';
define('TR_INCLUDE_PATH', '../');
require TR_INCLUDE_PATH . 'vitals.inc.php';
session_start();
include 'securimage.php';
$img = new Securimage();
header('Content-type: audio/x-wav');
header('Content-Disposition: attachment; name="securimage.wav"');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Expires: Sun, 1 Jan 2000 12:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . 'GMT');
echo $img->getAudibleCode();
exit;
示例2: dirname
<?php
error_reporting(E_ALL ^ E_NOTICE ^ E_WARNING);
// Wimpy mode
ini_set('session.use_only_cookies', true);
session_start();
require_once dirname(__FILE__) . '/../../includes/symbionts/securimage/securimage.php';
$image = new Securimage();
// Set some variables
$image->use_wordlist = false;
$image->audio_path = realpath(dirname(__FILE__) . '/../../includes/symbionts/securimage/audio') . '/';
// Force trailing slash
header('Content-type: audio/x-wav');
header('Content-Disposition: attachment; filename="securimage.wav"');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Expires: Sun, 1 Jan 2000 12:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . 'GMT');
echo $image->getAudibleCode();
// Use our own session variable
$_SESSION['captcha'] = $image->getCode();