private function ReCaptcha::_encodeQS in Google Captcha 7
Encodes the given data into a query string format.
Parameters
array $data array of string elements to be encoded.:
Return value
string - encoded request.
1 call to ReCaptcha::_encodeQS()
- ReCaptcha::_submitHTTPGet in ReCAPTCHA/
php/ recaptchalib.php - Submits an HTTP GET to a reCAPTCHA server.
File
- ReCAPTCHA/
php/ recaptchalib.php, line 71
Class
Code
private function _encodeQS($data) {
$req = "";
foreach ($data as $key => $value) {
$req .= $key . '=' . urlencode(stripslashes($value)) . '&';
}
// Cut the last '&'
$req = substr($req, 0, strlen($req) - 1);
return $req;
}