Php Google Recaptcha v2-500内部服务器错误

Php Google Recaptcha v2-500内部服务器错误,php,recaptcha,Php,Recaptcha,Recaptcha v2已停止在我的站点上运行,返回500服务器错误 我尝试过重新调整代码,以防在我这边出现问题,但没有效果 有人能看到下面的问题吗?感谢您的帮助 形式 过程 <?php if(isset($_POST['g-recaptcha-response'])){ $captcha=$_POST['g-recaptcha-response']; } $secretKey = "mysecretkey"; $i

Recaptcha v2已停止在我的站点上运行,返回500服务器错误

我尝试过重新调整代码,以防在我这边出现问题,但没有效果

有人能看到下面的问题吗?感谢您的帮助

形式


过程

<?php
        if(isset($_POST['g-recaptcha-response'])){
          $captcha=$_POST['g-recaptcha-response'];
        }

    $secretKey = "mysecretkey";
    $ip = $_SERVER['REMOTE_ADDR'];
        $response=file_get_contents("https://www.google.com/recaptcha/api/siteverify?secret=".$secretKey."&response=".$captcha."&remoteip=".$ip);
    $responseKeys = json_decode($response,true);
        if(intval($responseKeys["success"]) !== 1) {
          echo '<h2>You are spammer !</h2>';
        } else {
          echo '<h2>Thanks for posting comment.</h2>';
        }
    ?>


500是一个内部srever错误,请查看您的日志文件,看看发生了什么。我已向我的主机确认这确实是一个服务器错误。谢谢你的回复谢谢
<?php
        if(isset($_POST['g-recaptcha-response'])){
          $captcha=$_POST['g-recaptcha-response'];
        }

    $secretKey = "mysecretkey";
    $ip = $_SERVER['REMOTE_ADDR'];
        $response=file_get_contents("https://www.google.com/recaptcha/api/siteverify?secret=".$secretKey."&response=".$captcha."&remoteip=".$ip);
    $responseKeys = json_decode($response,true);
        if(intval($responseKeys["success"]) !== 1) {
          echo '<h2>You are spammer !</h2>';
        } else {
          echo '<h2>Thanks for posting comment.</h2>';
        }
    ?>