Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
26 | public function check($gResponse) { |
||
27 | $data = []; |
||
28 | $data['secret'] = $this->config['secret']; |
||
29 | $data['response'] = $gResponse; |
||
30 | $dara['remoteip'] = $_SERVER['REMOTE_ADDR']; |
||
31 | $response = file_get_contents('https://www.google.com/recaptcha/api/siteverify?' . http_build_query($data)); |
||
32 | if ($response) { |
||
33 | return json_decode($response); |
||
34 | } |
||
35 | return false; |
||
36 | } |
||
37 | } |