gglcptch_recaptcha_qsencode

Encodes the given data into a query string format.

Description

(string) gglcptch_recaptcha_qsencode( $data ); 

Returns (string)

- encoded request

Parameters (1)

0. $data
- array of string elements to be encoded

Usage

  1. if ( !function_exists( 'gglcptch_recaptcha_qsencode' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'google-captcha-recaptcha-by-bestwebsoft/lib/recaptchalib.php'; 
  3.  
  4. // - array of string elements to be encoded 
  5. $data = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = gglcptch_recaptcha_qsencode($data); 
  9.  

Defined (1)

The function is defined in the following location(s).

/lib/recaptchalib.php  
  1. function gglcptch_recaptcha_qsencode ($data) { 
  2. $req = ""; 
  3. foreach ( $data as $key => $value ) 
  4. $req .= $key . '=' . urlencode( stripslashes($value) ) . '&'; 
  5.  
  6. // Cut the last '&' 
  7. $req=substr($req, 0, strlen($req)-1); 
  8. return $req;