Migration 迁移到新服务器后,Recaptcha验证不起作用

Migration 迁移到新服务器后,Recaptcha验证不起作用,migration,recaptcha,Migration,Recaptcha,我将一些网站移到了一个新的VPS服务器上,现在相关的recaptchas已加载,但似乎没有进行验证 <?php $member = new Member; if (isset($_POST['first_name']) && isset($_POST['last_name']) && isset($_POST['city']) && isset($_POST['state']) && isset($_POST['email']

我将一些网站移到了一个新的VPS服务器上,现在相关的recaptchas已加载,但似乎没有进行验证

<?php
$member = new Member;
if (isset($_POST['first_name']) && isset($_POST['last_name']) && isset($_POST['city']) && isset($_POST['state']) && isset($_POST['email']))  // Check for full submission
           { 
       
               //check recaptcha
       $secretKey = "...";
       $responseKey = $_POST['g-recaptcha-response'];
       $userIP = $_SERVER['REMOTE_ADDR']; //optional    
       $url = "https://www.google.com/recaptcha/api/siteverify?secret=$secretKey&response=$responseKey&remoteip=$userIP";
       $response = file_get_contents($url);
       $response = json_decode($response);
       if ($response->success){
           if ($member->add_email_member($_POST)) {//NOTE:what to send to add_email_member

   
   $session->message("<h2>Thank you {$member->first_name} for your submission. You are now a member .</h2>");
   redirect_to($_SERVER['HTTP_REFERER']);
   
   }
       else {
          $session->message("<h2>I am sorry the email, {$member->email}, has already been registered.</h2>");
      redirect_to($_SERVER['HTTP_REFERER']);             
       } 
          
       }else{
            $session->message("<h2>Try to add yourself , and don't forget to verify with the captcha!</h2>");
      redirect_to($_SERVER['HTTP_REFERER']);
       }
   } 
?>

我得到的回应是“再试一次”。所有这些都是在旧知识产权下进行的。我用google删除了旧的recaptcha设置,并添加了一个新的。仍然没有得到“成功”的回应。任何关于如何进一步解决此问题的想法。谢谢