Comments (3)
getCaptchaHtml
has the ability to control some aspects of the captcha, but nothing that affects the properties of the image itself. The reason for this is because there is no facility to pass customization options through the URL to affect the appearance of the captcha image (malicious users could then customize the appearance of your image to make it easier to solve).
If you want to use a math captcha, you can either change the properties in securimage_show.php
, or edit config.inc.php
in the securimage directory and set the appearance options there.
Acceptable options to getCaptchaHtml() can be seen here.
from securimage.
That makes sense, thanks. It might be helpful to list the bad properties under getCaptchaHtml in the docs, with your explanation. I did a page search for "captcha_type", but didn't find this information.
from securimage.
I agree, they need to be documented somewhere better, other than the code.
Currently they are:
/**
* Returns HTML code for displaying the captcha image, audio button, and form text input.
*
* Options can be specified to modify the output of the HTML. Accepted options:
*
* 'securimage_path':
* Optional: The URI to where securimage is installed (e.g. /securimage)
* 'show_image_url':
* Path to the securimage_show.php script (useful when integrating with a framework or moving outside the securimage directory)
* This will be passed as a urlencoded string to the <img> tag for outputting the captcha image
* 'audio_play_url':
* Same as show_image_url, except this indicates the URL of the audio playback script
* 'image_id':
* A string that sets the "id" attribute of the captcha image (default: captcha_image)
* 'image_alt_text':
* The alt text of the captcha image (default: CAPTCHA Image)
* 'show_audio_button':
* true/false Whether or not to show the audio button (default: true)
* 'disable_flash_fallback':)
* Allow only HTML5 audio and disable Flash fallback
* 'show_refresh_button':
* true/false Whether or not to show a button to refresh the image (default: true)
* 'audio_icon_url':
* URL to the image used for showing the HTML5 audio icon
* 'icon_size':
* Size (for both height & width) in pixels of the audio and refresh buttons
* 'show_text_input':
* true/false Whether or not to show the text input for the captcha (default: true)
* 'refresh_alt_text':
* Alt text for the refresh image (default: Refresh Image)
* 'refresh_title_text':
* Title text for the refresh image link (default: Refresh Image)
* 'input_id':
* A string that sets the "id" attribute of the captcha text input (default: captcha_code)
* 'input_name':
* A string that sets the "name" attribute of the captcha text input (default: same as input_id)
* 'input_text':
* A string that sets the text of the label for the captcha text input (default: Type the text:)
* 'input_attributes':
* An array of additional HTML tag attributes to pass to the text input tag (default: empty)
* 'image_attributes':
* An array of additional HTML tag attributes to pass to the captcha image tag (default: empty)
* 'error_html':
* Optional HTML markup to be shown above the text input field
* 'namespace':
* The optional captcha namespace to use for showing the image and playing back the audio. Namespaces are for using multiple captchas on the same page.
*
* @param array $options Array of options for modifying the HTML code.
* @param int $parts Securiage::HTML_* constant controlling what component of the captcha HTML to display
*
* @return string The generated HTML code for displaying the captcha
*/
public static function getCaptchaHtml($options = array(), $parts = Securimage::HTML_ALL)
For reference, they are in securimage.php at function getCaptchaHtml()
. I'll leave this open for a while longer for any feedback and easier accessibility.
from securimage.
Related Issues (20)
- Typo in PDO::purgeOldCodesFromDatabase() in master HOT 2
- Difference in captcha image reload functionally in the two branches HOT 1
- When using case sensitive captcha, the audio version just says the letter and not capital or lowercase letter
- Composer install post cmd error HOT 7
- [Bug reporting] multiple XSS in securimage
- secureimage.php – curley braces are deprecated HOT 1
- Redis setTimeout is deprecated consider changing to expire HOT 1
- php8 float conversion HOT 1
- Compatibility with PHP 8.2 HOT 1
- Failed to generate captcha image, content has already been output
- PHP Warning: Division by zero in securimage-3.6.7/securimage.php on line 2112
- Problem with user pages HOT 1
- Text not change on reloaded HOT 1
- can't install via composer HOT 2
- captcha Audio with Captcha IDs
- Erreur: Undefined class constant 'SI_DRIVER_SQLITE3' in StorageAdapter/PDO.php file HOT 1
- Illegal string offset 'code' in securimage.php:1403 HOT 3
- Curly brace syntax
- Composer version HOT 3
- Project status HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from securimage.