Class SocketPost
Sends a POST request to the reCAPTCHA service, but makes use of fsockopen() instead of get_file_contents(). This is to account for people who may be on servers where allow_furl_open is disabled.
- ReCaptcha\RequestMethod\SocketPost implements ReCaptcha\RequestMethod
public
|
|
public
string
|
#
submit(
Submit the POST request with the specified parameters. |
string |
RECAPTCHA_HOST
reCAPTCHA service host. |
#
'www.google.com'
|
string |
SITE_VERIFY_PATH
|
#
'/recaptcha/api/siteverify'
|
string |
BAD_REQUEST
|
#
'{"success": false, "error-codes": ["invalid-request"]}'
|
string |
BAD_RESPONSE
|
#
'{"success": false, "error-codes": ["invalid-response"]}'
|