$options = array('http' => array('header' => "Content-type: application/x-www-form-urlencoded\r\n", 'method' => 'POST', 'content' => http_build_query($data))); $context = stream_context_create($options); $result = file_get_contents($url, false, $context); if (strpos($result, 'true') === false) { $erreurBool = true; $erreurs["captcha"] .= "Recaptcha verification error<br/>"; } } } else { $erreurs["general"] .= "A field is empty<br/>"; } if (!$erreurBool) { // Si aucune erreur, on fait l'inscription try { $registerkey = sha1(mt_rand(10000, 99999) . time() . $mail); $rep = BaseDonnee::userInscription($bdd, $pseudo, $mail, $mdp1, $pays, $registerkey); } catch (Exception $e) { $erreurs["general"] .= "A field is too long<br/>"; header("Location: ./register.php"); exit; } // Maintenant on vérifie l'état de l'inscription if ($rep) { //Si l'inscription a réussi $link = "http://www.crypto-maniac.com/users/register.php?usr="******"&key=" . $registerkey; // Sujet $subject = 'Crypto-maniac - Account activation'; // message $message = ' <html> <head>