Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to change audio file #79

Open
hugsbrugs opened this issue May 7, 2018 · 1 comment
Open

How to change audio file #79

hugsbrugs opened this issue May 7, 2018 · 1 comment

Comments

@hugsbrugs
Copy link

Hi there, I'd like to know how to change default audio files :
This does not work

require_once __DIR__ . '/vendor/dapphp/securimage/securimage.php';
echo Securimage::getCaptchaHtml([
	'audio_path' => __DIR__ . '/php/secureimage/audio/en/'
]);

When I read docs :

$img = new Securimage();
$img->audio_path = $img->securimage_path . '/audio/de/'; // switch to German

but how do I then call a static method with an instanciated class ?

Thanks for your lights !

@ghost
Copy link

ghost commented Jan 9, 2019

make it easier and there will be no problems:

//put in securimage_play.php; $img->audio_path = dirname(__FILE__).'/audio/fr/';

in html:

<a target="_blank" href="/securimage_play.php"><img class="captcha_play_image" width="32" src="/c/audio_icon.png" alt="Play CAPTCHA Audio"></a>

And don't use classes, it complicates the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant