Page 1 of 2

Chanege Captcha?

PostPosted: Fri Jul 13, 2012 11:54 am
by kickassnico
Can anyone help me!!

I'm trying to change the download/register re-chaptcha to a solvemedia.com chaptcha.

Here's a Video that will show solvemedia chaptcha

https://vimeo.com/user4748906/solve-media-capthca-type-ins

Thanks If You A Can Help.

Re: Chanege Captcha?

PostPosted: Fri Jul 13, 2012 4:04 pm
by SamEA
Please post the code and I'll provide you with instructions on how to implement it.

Re: Chanege Captcha?

PostPosted: Fri Jul 13, 2012 8:32 pm
by kickassnico
Thanks for helping me out...
Here's a link to the codes http://portal.solvemedia.com/portal/help/pub/implement

Re: Chanege Captcha?

PostPosted: Sun Jul 15, 2012 7:58 am
by SamEA
No problem.

In ./pages/register.php, replace:
Code: Select all
if( $_SESSION['security_code'] == $_POST['security_code'] && !empty($_SESSION['security_code'] ) ) {

with
Code: Select all
if ($solvemedia_response->is_valid) {


Also, don't forget to include this line of code as according to their specifications in ./pages/register.php:

Code: Select all
require_once("solvemedialib.php");
$privkey="your_private_key";
$hashkey="your_hash_key";
$solvemedia_response = solvemedia_check_answer($privkey,
               $_SERVER["REMOTE_ADDR"],
               $_POST["adcopy_challenge"],
               $_POST["adcopy_response"],
               $hashkey);


It is recommend to place that code anywhere after:
Code: Select all
require_once("./config.php");

if(in_array($language, $LANGUAGE_LIST)) {
  include('./lang/'.$language.'.php');
} else {
  include('./lang/'.$LANGUAGE_LIST[0].'.php');
}


Finally, find in ./styles/Indigo/register.php:

Code: Select all
<img src="CaptchaSecurityImages.php?width=100&height=40&characters=5" /><br /><input id="security_code" name="security_code" type="text" />


Replace with:

Code: Select all
<?php echo solvemedia_get_html("your_challenge_key"); //outputs the widget ?>


Optional: You can remove the following code which appears twice in ./pages/register.php:
Code: Select all
unset($_SESSION['security_code']);


That in theory should work.

Re: Chanege Captcha?

PostPosted: Sun Jul 15, 2012 12:21 pm
by kickassnico
Hey Sam, its not working do you think if I give FTP access you can help me out.

Re: Chanege Captcha?

PostPosted: Mon Jul 16, 2012 1:11 am
by SamEA
Check that you have included all files as required by them. Please provide feedback on what happens once you followed all the above steps.

Re: Chanege Captcha?

PostPosted: Mon Jul 16, 2012 4:47 pm
by kickassnico
I Get This Error :

Fatal error: Call to undefined function solvemedia_get_html() in /home/[USER]/public_html/styles/Indigo/register.php on line 85

Re: Chanege Captcha?

PostPosted: Mon Jul 16, 2012 8:43 pm
by SamEA
Did you include
Code: Select all
require_once("solvemedialib.php");
in and at the beginning of ./pages/register.php?

Re: Chanege Captcha?

PostPosted: Mon Jul 16, 2012 9:14 pm
by kickassnico
Yes, but it still doesn't work... :(

Re: Chanege Captcha?

PostPosted: Wed Jul 18, 2012 3:16 pm
by SamEA
As I've never used their API before, can you verify it works by itself first? Afterwards, if it does work, PM or post the working code and I'll look into why my above method does not work with their API.