totox777 / karamel
用于使用 caramel 验证码的包
dev-master
2013-12-09 12:58 UTC
Requires
- php: >=5.3.0
- illuminate/support: 4.0.x
This package is not auto-updated.
Last update: 2024-09-24 00:14:19 UTC
README
基于 karamel 包装器的 Laravel 4 karamel 包
将以下行添加到您的 composer.json 文件中
"totox777/karamel": "dev-master"
然后,运行
composer update
以拉取最新版本。
将以下行添加到您的 app.php 提供器数组中
'Totox777\Karamel\KaramelServiceProvider',
并将以下行添加到 app.php 别名数组中
'Karamel' => 'Totox777\Karamel\Facades\Profiler',
配置:不要忘记在 vendor/totox777/karamel/src/config/config.php 中更改从 dev.karamel.co.id 获得的 api-key 和 memberID / Email
示例用法(表单)
Karamel::GetCaptcha();
示例用法(验证)
$responseValue = $_POST["gotcha_val"];
$status = Karamel::ValidateCaptcha($responseValue);
if ($status)
{
// Corrent answer, continue with your submission process
} else {
// Wrong answer, you may display a new AdsCaptcha and add an error message
}