src/Geetest.php
/**
     * Get validation result by normal mode.
     *
     * @param string $challenge
     * @param string $validate
     * @param string $seccode
     * @param array $param
     * @param int $jsonFormat
     * @return bool
     */
Get validation result by normal mode.
Get validation result by normal mode .
public function successValidate($challenge, $validate, $seccode, $param, $jsonFormat = 1)
    {
        if (!$this->checkValidate($challenge, $validate)) {
            return false;
        }
        $response = $this->request('validate.php',array_merge([
            'seccode'     => $seccode,
            'challenge'   => $challenge,
            'captchaid'   => $this->id,
            'json_format' => $jsonFormat,
            'sdk'         => self::GT_SDK_VERSION,
            'timestamp'   => time()
        ], $param), null, 'POST');
        $res = json_decode($response);
        return $res && $res->seccode == md5($seccode);
    }
public function successValidate ( $ challenge , $ validate , $ seccode , $ param , $ jsonFormat = 1 ) { if ( ! $ this -> checkValidate ( $ challenge , $ validate ) ) { return false ; } $ response = $ this -> request ( 'validate.php' , array_merge ( [ 'seccode' => $ seccode , 'challenge' => $ challenge , 'captchaid' => $ this -> id , 'json_format' => $ jsonFormat , 'sdk' => self :: GT_SDK_VERSION , 'timestamp' => time ( ) ] , $ param ) , null , 'POST' ) ; $ res = json_decode ( $ response ) ; return $ res && $ res -> seccode == md5 ( $ seccode ) ; }
Get validation result by normal mode.
Get validation result by normal mode .