4
4
* - Documentation and latest version
5
5
* http://recaptcha.net/plugins/php/
6
6
* - Get a reCAPTCHA API Key
7
- * http ://recaptcha.net/api/getkey
7
+ * https ://www.google.com/recaptcha/admin/create
8
8
* - Discussion group
9
9
* http://groups.google.com/group/recaptcha
10
10
*
35
35
/**
36
36
* The reCAPTCHA server URL's
37
37
*/
38
- define ("RECAPTCHA_API_SERVER " , "http://api.recaptcha.net " );
39
- define ("RECAPTCHA_API_SECURE_SERVER " , "https://api-secure.recaptcha.net " );
40
- define ("RECAPTCHA_VERIFY_SERVER " , "api-verify.recaptcha.net " );
38
+ define ("RECAPTCHA_API_SERVER " , "http://www.google.com/recaptcha/api " );
39
+ define ("RECAPTCHA_API_SECURE_SERVER " , "https://www.google.com/recaptcha/api " );
40
+ define ("RECAPTCHA_VERIFY_SERVER " , "www.google.com " );
41
41
42
42
/**
43
43
* Encodes the given data into a query string format
@@ -106,7 +106,7 @@ function _recaptcha_http_post($host, $path, $data, $port = 80) {
106
106
function recaptcha_get_html ($ pubkey , $ error = null , $ use_ssl = false )
107
107
{
108
108
if ($ pubkey == null || $ pubkey == '' ) {
109
- die ("To use reCAPTCHA you must get an API key from <a href='http ://recaptcha.net/api/getkey'>http ://recaptcha.net/api/getkey </a> " );
109
+ die ("To use reCAPTCHA you must get an API key from <a href='https ://www.google.com/recaptcha/admin/create'>https ://www.google.com/recaptcha/admin/create </a> " );
110
110
}
111
111
112
112
if ($ use_ssl ) {
@@ -152,7 +152,7 @@ class ReCaptchaResponse {
152
152
function recaptcha_check_answer ($ privkey , $ remoteip , $ challenge , $ response , $ extra_params = array ())
153
153
{
154
154
if ($ privkey == null || $ privkey == '' ) {
155
- die ("To use reCAPTCHA you must get an API key from <a href='http ://recaptcha.net/api/getkey'>http ://recaptcha.net/api/getkey </a> " );
155
+ die ("To use reCAPTCHA you must get an API key from <a href='https ://www.google.com/recaptcha/admin/create'>https ://www.google.com/recaptcha/admin/create </a> " );
156
156
}
157
157
158
158
if ($ remoteip == null || $ remoteip == '' ) {
@@ -169,7 +169,7 @@ function recaptcha_check_answer ($privkey, $remoteip, $challenge, $response, $ex
169
169
return $ recaptcha_response ;
170
170
}
171
171
172
- $ response = _recaptcha_http_post (RECAPTCHA_VERIFY_SERVER , "/verify " ,
172
+ $ response = _recaptcha_http_post (RECAPTCHA_VERIFY_SERVER , "/recaptcha/api/ verify " ,
173
173
array (
174
174
'privatekey ' => $ privkey ,
175
175
'remoteip ' => $ remoteip ,
@@ -200,7 +200,7 @@ function recaptcha_check_answer ($privkey, $remoteip, $challenge, $response, $ex
200
200
* @param string $appname The name of your application
201
201
*/
202
202
function recaptcha_get_signup_url ($ domain = null , $ appname = null ) {
203
- return "http ://recaptcha.net/api/getkey ? " . _recaptcha_qsencode (array ('domain ' => $ domain , 'app ' => $ appname ));
203
+ return "https ://www.google.com/recaptcha/admin/create ? " . _recaptcha_qsencode (array ('domains ' => $ domain , 'app ' => $ appname ));
204
204
}
205
205
206
206
function _recaptcha_aes_pad ($ val ) {
@@ -230,14 +230,14 @@ function _recaptcha_mailhide_urlbase64 ($x) {
230
230
function recaptcha_mailhide_url ($ pubkey , $ privkey , $ email ) {
231
231
if ($ pubkey == '' || $ pubkey == null || $ privkey == "" || $ privkey == null ) {
232
232
die ("To use reCAPTCHA Mailhide, you have to sign up for a public and private key, " .
233
- "you can do so at <a href='http://mailhide.recaptcha.net/ apikey'>http://mailhide.recaptcha.net /apikey</a> " );
233
+ "you can do so at <a href='http://www.google.com/recaptcha/mailhide/ apikey'>http://www.google.com/recaptcha/mailhide /apikey</a> " );
234
234
}
235
235
236
236
237
237
$ ky = pack ('H* ' , $ privkey );
238
238
$ cryptmail = _recaptcha_aes_encrypt ($ email , $ ky );
239
239
240
- return "http://mailhide.recaptcha.net /d?k= " . $ pubkey . "&c= " . _recaptcha_mailhide_urlbase64 ($ cryptmail );
240
+ return "http://www.google.com/recaptcha/mailhide /d?k= " . $ pubkey . "&c= " . _recaptcha_mailhide_urlbase64 ($ cryptmail );
241
241
}
242
242
243
243
/**
@@ -262,7 +262,7 @@ function _recaptcha_mailhide_email_parts ($email) {
262
262
* Gets html to display an email address given a public an private key.
263
263
* to get a key, go to:
264
264
*
265
- * http://mailhide.recaptcha.net /apikey
265
+ * http://www.google.com/recaptcha/mailhide /apikey
266
266
*/
267
267
function recaptcha_mailhide_html ($ pubkey , $ privkey , $ email ) {
268
268
$ emailparts = _recaptcha_mailhide_email_parts ($ email );
0 commit comments