Conditions | 1 |
Paths | 1 |
Total Lines | 5 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
18 | public static function isValid() { |
||
19 | $captcha = $_POST['g-recaptcha-response']; |
||
20 | $response = json_decode(file_get_contents("https://www.google.com/recaptcha/api/siteverify?secret=" . static::$secretKey . "&response=" . $captcha . "&remoteip=" . $_SERVER['REMOTE_ADDR']), TRUE); |
||
21 | return (boolean) $response['success']; |
||
22 | } |
||
23 | |||
25 |