簡體   English   中英

PHP Recaptcha表單僅適用於IP地址,而不適用於www.google.com。

[英]PHP Recaptcha Form only Works with IP Address instead of www.google.com

如標題中所述。 我的Recaptcha表單僅在以下情況下有效:

define("RECAPTCHA_VERIFY_SERVER", "www.google.com");

對此:

define("RECAPTCHA_VERIFY_SERVER", "74.125.236.178");

我正在使用myhosting.com vps linux服務器。 知道為什么它不適用於www.google.com嗎?

解決此問題的方法是,

//line 40 in recpatchalib.php and replace:
define("RECAPTCHA_VERIFY_SERVER", "api-verify.recaptcha.net");

// With this:
define("RECAPTCHA_VERIFY_SERVER", gethostbyname('api-verify.recaptcha.net'));

試試吧。

從“ 問題”頁面獲得。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM