
November 26th, 2012, 08:36 PM
|
|
Registered User
|
|
Join Date: Nov 2012
Posts: 1
Time spent in forums: 1 h 7 m 31 sec
Reputation Power: 0
|
|
|
Help Please With Adding A Captcha
Hello im in big need of some help and i came here first. I tired fixing my form with a captcha from SolveMedia.
The website SolveMedia has some guides but i cant figure them out.
Here is where I need it added.
PHP Code:
<?php if(CONTINUE_TO_IMAGE == 1 && !isset($_POST['imgContinue'])) {
echo "
<div id='continuetoimage'>
<form action='' method='POST'>
<p>
<input class='button white bigwidth' type='submit' name='imgContinue' value='Continue to image ... ' />
</p>
</form>
</div>
";
} else { ?>
<div id="image_details">
<?php
list($width, $height) = getimagesize($dirImg);
echo "<p><strong>Date added:</strong> {$rowImage['date_added']}</p>";
echo "<p><strong>Views:</strong> {$viewsupdate} </p>";
echo "<p><strong>Width:</strong> {$width}px</p>";
echo "<p><strong>Height:</strong> {$height}px</p>";
if($width > 1000) {
echo "<br /><br /><p><i>This image was resized. Click to view full size</i></p>";
}
?>
</div>
<?php
And I need to add something like this too it but i cant and keep running into syntax errors.
PHP Code:
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);
if (!$solvemedia_response->is_valid) {
//handle incorrect answer
print "Error: ".$solvemedia_response->error;
}
else {
//process form here
}
PHP Code:
require_once("solvemedialib.php"); //include the Solve Media library
echo solvemedia_get_html("your_challenge_key"); //outputs the widget
|