Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
15 | public function captchaCheck() |
||
16 | { |
||
17 | $response = Input::get('g-recaptcha-response'); |
||
18 | $remoteip = $_SERVER['REMOTE_ADDR']; |
||
19 | $secret = config('blog.services.reCaptchSecret'); |
||
20 | $recaptcha = new ReCaptcha($secret); |
||
21 | $resp = $recaptcha->verify($response, $remoteip); |
||
22 | |||
23 | if ($resp->isSuccess()) { |
||
24 | return true; |
||
25 | } |
||
26 | |||
27 | return false; |
||
28 | } |
||
30 |