$skey, 'response' => $captcha, 'remoteip' => $ip ]; $options = [ 'http' => [ 'header' => "Content-type: application/x-www-form-urlencoded", 'method' => 'POST', 'content' => http_build_query($data) ] ]; $stream = stream_context_create($options); $result = file_get_contents($url, false, $stream); $response = json_decode($result); if (empty($response->success)) { http_response_code(403); exit("An error occurred: You must fill the captcha in order to register."); } if ($password !== $passwordC) { exit("An error occurred: Passwords do not match."); } $functionload = signup($username, $password, $gender); if ($functionload === true) { header("Location: /landing/activation"); exit(); } else { exit("An unknown error occurred when registering your account."); } ?>