Skip to content

Commit

Permalink
Merge pull request #2 from elkangaroo/master
Browse files Browse the repository at this point in the history
Updated Recaptcha API servers / Fix for issue #1
  • Loading branch information
Aleksey Korzun committed Mar 14, 2013
2 parents 3da6edf + 641708d commit f4a0736
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Package/Captcha/Captcha.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,21 +45,21 @@ class Captcha
*
* @var string
*/
const SERVER = 'http://api.recaptcha.net';
const SERVER = 'http://www.google.com/recaptcha/api';

/**
* reCaptcha's secure API server
*
* @var string
*/
const SERVER_SECURE = 'https://api-secure.recaptcha.net';
const SERVER_SECURE = 'https://www.google.com/recaptcha/api';

/**
* reCaptcha's verify server
*
* @var string
*/
const VERIFY_SERVER = 'api-verify.recaptcha.net';
const VERIFY_SERVER = 'www.google.com';

/**
* Private key
Expand Down Expand Up @@ -269,7 +269,7 @@ protected function process($parameters)
// Properly encode parameters
$parameters = $this->encode($parameters);

$request = "POST /verify HTTP/1.0\r\n";
$request = "POST /recaptcha/api/verify HTTP/1.0\r\n";
$request .= "Host: " . self::VERIFY_SERVER . "\r\n";
$request .= "Content-Type: application/x-www-form-urlencoded;\r\n";
$request .= "Content-Length: " . strlen($parameters) . "\r\n";
Expand Down

0 comments on commit f4a0736

Please sign in to comment.