44 * - Documentation and latest version
55 * http://recaptcha.net/plugins/php/
66 * - Get a reCAPTCHA API Key
7- * http ://recaptcha.net/api/getkey
7+ * https ://www.google.com/recaptcha/admin/create
88 * - Discussion group
99 * http://groups.google.com/group/recaptcha
1010 *
3535/**
3636 * The reCAPTCHA server URL's
3737 */
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 " );
4141
4242/**
4343 * Encodes the given data into a query string format
@@ -106,7 +106,7 @@ function _recaptcha_http_post($host, $path, $data, $port = 80) {
106106function recaptcha_get_html ($ pubkey , $ error = null , $ use_ssl = false )
107107{
108108 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> " );
110110 }
111111
112112 if ($ use_ssl ) {
@@ -152,7 +152,7 @@ class ReCaptchaResponse {
152152function recaptcha_check_answer ($ privkey , $ remoteip , $ challenge , $ response , $ extra_params = array ())
153153{
154154 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> " );
156156 }
157157
158158 if ($ remoteip == null || $ remoteip == '' ) {
@@ -169,7 +169,7 @@ function recaptcha_check_answer ($privkey, $remoteip, $challenge, $response, $ex
169169 return $ recaptcha_response ;
170170 }
171171
172- $ response = _recaptcha_http_post (RECAPTCHA_VERIFY_SERVER , "/verify " ,
172+ $ response = _recaptcha_http_post (RECAPTCHA_VERIFY_SERVER , "/recaptcha/api/ verify " ,
173173 array (
174174 'privatekey ' => $ privkey ,
175175 'remoteip ' => $ remoteip ,
@@ -200,7 +200,7 @@ function recaptcha_check_answer ($privkey, $remoteip, $challenge, $response, $ex
200200 * @param string $appname The name of your application
201201 */
202202function 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 ));
204204}
205205
206206function _recaptcha_aes_pad ($ val ) {
@@ -230,14 +230,14 @@ function _recaptcha_mailhide_urlbase64 ($x) {
230230function recaptcha_mailhide_url ($ pubkey , $ privkey , $ email ) {
231231 if ($ pubkey == '' || $ pubkey == null || $ privkey == "" || $ privkey == null ) {
232232 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> " );
234234 }
235235
236236
237237 $ ky = pack ('H* ' , $ privkey );
238238 $ cryptmail = _recaptcha_aes_encrypt ($ email , $ ky );
239239
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 );
241241}
242242
243243/**
@@ -262,7 +262,7 @@ function _recaptcha_mailhide_email_parts ($email) {
262262 * Gets html to display an email address given a public an private key.
263263 * to get a key, go to:
264264 *
265- * http://mailhide.recaptcha.net /apikey
265+ * http://www.google.com/recaptcha/mailhide /apikey
266266 */
267267function recaptcha_mailhide_html ($ pubkey , $ privkey , $ email ) {
268268 $ emailparts = _recaptcha_mailhide_email_parts ($ email );
0 commit comments