Laminas-recaptcha question

I’m trying to get my reCaptcha to show but all I get is the broken image icon. I don’t know where I place my siteKey and secretKey. Any help is much appreciated.

Hello and welcome to our forums! :smiley:

Please check the related documentation there you will find an example:

$recaptcha = new Laminas\ReCaptcha\ReCaptcha($pubKey, $privKey);

Please note that only version 2 is supported at the moment.

The sitekey and secretkey is usually stored in a config file that is not accessible publicly. I’m not sure if your app uses a database but I think you’d be OK to store them in the same file as where your DB password is stored and used by your app to connect to the DB.

1 Like

Thanks for the documentation and specification of the code.

Thanks for that info, I’ll store them in there.