Removing boolean and popping some documentation down
This commit is contained in:
@@ -99,17 +99,16 @@ function _recaptcha_http_post($host, $path, $data, $port = 80) {
|
|||||||
* is embedded within the HTML form it was called from.
|
* is embedded within the HTML form it was called from.
|
||||||
* @param string $pubkey A public key for reCAPTCHA
|
* @param string $pubkey A public key for reCAPTCHA
|
||||||
* @param string $error The error given by reCAPTCHA (optional, default is null)
|
* @param string $error The error given by reCAPTCHA (optional, default is null)
|
||||||
* @param boolean $use_ssl Should the request be made over ssl? (optional, default is false)
|
|
||||||
* @return string - The HTML to be embedded in the user's form.
|
* @return string - The HTML to be embedded in the user's form.
|
||||||
*/
|
*/
|
||||||
function recaptcha_get_html ($pubkey, $error = null, $use_ssl = false)
|
function recaptcha_get_html ($pubkey, $error = null)
|
||||||
{
|
{
|
||||||
if ($pubkey == null || $pubkey == '') {
|
if ($pubkey == null || $pubkey == '') {
|
||||||
die ("To use reCAPTCHA you must get an API key from <a href='https://www.google.com/recaptcha/admin/create'>https://www.google.com/recaptcha/admin/create</a>");
|
die ("To use reCAPTCHA you must get an API key from <a href='https://www.google.com/recaptcha/admin/create'>https://www.google.com/recaptcha/admin/create</a>");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off'
|
if (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off'
|
||||||
|| $_SERVER['SERVER_PORT'] == 443) {
|
|| $_SERVER['SERVER_PORT'] == 443) { // http://stackoverflow.com/questions/1175096/how-to-find-out-if-you-are-using-https-without-serverhttps
|
||||||
$server = RECAPTCHA_API_SECURE_SERVER;
|
$server = RECAPTCHA_API_SECURE_SERVER;
|
||||||
} else {
|
} else {
|
||||||
$server = RECAPTCHA_API_SERVER;
|
$server = RECAPTCHA_API_SERVER;
|
||||||
|
|||||||
Reference in New Issue
Block a user