Getting captcha to work - php Form

Author Topic: Getting captcha to work  (Read 1543 times)

Offline multicash

  • Supporter
  • **
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Getting captcha to work
« on: November 04, 2010, 06:12:53 PM »


I installed this script but cannot get captcha to work, and I cannot find any information on it. Please help

Offline leony

  • VIP
  • ****
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Re: Getting captcha to work
« Reply #1 on: November 04, 2010, 07:10:13 PM »
Code: [Select]
http://phpform.net/board/index.php/topic,339.0.html  - new version with reCAPTCHA

Offline multicash

  • Supporter
  • **
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Getting captcha to work
« Reply #2 on: November 05, 2010, 04:57:14 AM »
That's the one I have installed but this error keeps showing up.
Input error: k: Format of site key was invalid

Offline 99er

  • Supporter
  • **
  • Posts: 1
  • Karma: +2/-0
    • View Profile
Re: Getting captcha to work
« Reply #3 on: January 28, 2011, 09:11:56 PM »
I was getting the same error. 

I looked around config.php and found the following line:

$public = 'publicy';

The variables that were declared around $public all had a dollar sign inside the single quotes, so I changed the line likewise to:
$public = '$publicy';

The captcha worked fine for me after that.

Hope this helps someone!
Rich

Offline ciko

  • Contributor
  • *****
  • Posts: 32
  • Karma: +3/-0
  • Gender: Male
    • View Profile
    • phpenter.net
Re: Getting captcha to work
« Reply #4 on: January 28, 2011, 10:31:11 PM »
Yes that is true  :-\

options.php
Code: [Select]
<?php
$config
['metat'] = 'LinkBase L.1.0.';
$config['lang'] = 'english';
$config['temp'] = 'default';
$config['keypublic'] = "6Letj7oSAAAAANZa9F4BnxrsSfkom_fJ-lF8A53H";
$config['keycaptcha'] = "6Letj7oSAAAAAI6X4dPCJJ8Q9eCbCklIDF7X5Wr9";
$config['rowresult'] = 'x';
$config['featured'] = '<a href="http://www.google.com">Google.com</a> - Enables users to search the Web, Usenet, and images. Features include PageRank, caching and translation of results, and an option to find similar pages.';
$config['homeintro'] = 'This script allows you to manage your links using a MySQL database. It features easy install, user submission, and an admin panel to add, edit and remove categories and links. The script is easy to customize to suit your needs. <font color="red">Demo version L.1.0</font>';
?>

index.php

Code: [Select]
<?php 
include('header.php');
include(
'options.php');
?>

<table width="90%" border="0" align="center" cellpadding="2" cellspacing="8" bgcolor="#FFFFFF">
<tr><td><strong>Configuration</strong></td><tr>
<tr><td width="450px">
<?php
if(isset($_POST['submit']))
{
$metaty $_POST['metaty'];
$langy $_POST['langy'];
$tempy $_POST['tempy'];
$publicy $_POST['publicy'];
$keyy $_POST['keyy'];
$homeintroy $_POST['homeintroy'];
$featuredy $_POST['featuredy'];
$metat='$config[\'metat\']';
$lang='$config[\'lang\']';
$temp='$config[\'temp\']';
$public='$config[\'keypublic\']';
$key='$config[\'keycaptcha\']';
$homeintro='$config[\'homeintro\']';
$featured='$config[\'featured\']';
$result='$config[\'rowresult\']';
$resulty='x';
$myFile="options.php";
$fh fopen($myFile'w') or die("can't open file- check CHMOD");
$stringData 
"<?php 
$metat = '$metaty';
$lang = '$langy';
$temp = '$tempy';
$public = '$publicy';
$key = '$keyy';
$homeintro = '$homeintroy';
$featured = '$featuredy';
$result = '$resulty';
?>
";
fwrite($fh, $stringData);
fclose($fh);
echo"<br><center><font size=2 color=green><b>Successfully.</b></font></center>";
}else{
?>
<div id=vforms>
<form method="post" action="index.php">
<center>
<font color=#3A586A>WebSite Name</font><br><input type=text name="metaty" value="<?php echo $config['metat'?>" size="35">
<br><br>
<font color=#3A586A>Language</font><br><select name="langy">
<option selected value="<?php echo $config['lang'?>"><?php echo $config['lang'?></option>
<option value='english'>---- English</option>
<option value='serbian'>---- Serbian</option>
<option value='dutch'>---- Dutch</option>
<option value='arabic'>---- Arabic</option>
</select><br><br>
<font color=#3A586A>Template</font><br><select name="tempy" value="cllassic">
<option selected value="<?php echo $config['temp'?>"><?php echo $config['temp'?></option>
<option value='default'>--- Default</option>
</select><br><br>
<font color=#3A586A>Recaptcha Public Key:</font><br><input type=text name="publicy" value="<?php echo $config['keypublic'?>" size="35">
<br><br>
<font color=#3A586A>Recaptcha Private Key:</font><br><input type=text name="keyy" value="<?php echo $config['keycaptcha'?>" size="35">
<br><br>
<font color=#3A586A>Featured Text</font><br><textarea name="featuredy" size="35"><?php echo $config['featured'?></textarea>
<br><br>
<font color=#3A586A>Home Intro Text</font><br><textarea name="homeintroy" size="35"><?php echo $config['homeintro'?></textarea>
<br><br>
<INPUT TYPE="SUBMIT" name="submit" VALUE=" Submit">
</center>
</font>
</form>
</div>
<?php
}
?>

</td></tr>
</table>
<?php
include('footer.php');
?>