- http_build_query: documentation ( source)
<?PHP
$url = 'http://www.google.com/recaptcha/api/verify';
$data['privatekey'] = "6Lfzs_ESAAAAANS4DbMX4f5yLILbOxInzzZil2FE";
$data['remoteip'] = $_SERVER['REMOTE_ADDR'];
$data['challenge'] = $_POST['challenge'];
$data['response'] = $_POST['response'];
$options = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded\r\n",
'method' => 'POST',
'content' => http_build_query($data),
),
);