altcha
altcha copied to clipboard
Js error
Hi , i use your code , js and php...
PHP example have an error:
this: [CODE] $payload = [ 'algorithm' => $challenge['algorithm'], 'challenge' => $challenge['challenge'], 'number' => 12345, // Example number 'salt' => $challenge['salt'], 'signature' => $challenge['signature'], ];
[/CODE]
must change to :
[CODE] $payload = [ 'algorithm' => $challenge->algorithm, 'challenge' => $challenge->challenge, 'number' => 43267, // Example number 'salt' => $challenge->salt, 'signature' => $challenge->signature, ];
[/CODE]
because return an object instead of array.
Now i have this error :
altcha.js:1186 ALTCHA [name=altcha] SyntaxError: Unexpected token '<', "