JavaScript Editor Ajax software     Free javascripts 



Main Page

echo ‘<input type=”text” name=”response”>’;
echo ‘<input type=”hidden” name=”hash” value=”‘ . $gq[‘hash’] . ‘“>’;
echo ‘</form>’;
}
}
?>
4.
Modify
comments.php
as highlighted:
<?php
// load the nofollow library
require_once ‘include/nofollow.inc.php’;
// load the sanitize library
require_once ‘include/sanitize.inc.php’;
// load simple CAPTCHA library
require_once ‘include/simple_captcha.inc.php’;
?>
...
...
// display third comment
$inHTML = ‘<p>Sanitizing <img src=”INVALID-IMAGE”‘ .
‘onerror=”location.href=\‘http://too.much.spam/\‘“>!</p>’;
echo sanitizeHTML($inHTML);
// display CAPTCHA question
SimpleCAPTCHA::display_demo_form();
// display answer
if (isset($_GET[‘response’]) && isset($_GET[‘hash’]))
{
if(SimpleCAPTCHA::check_answer($_GET[‘response’], $_GET[‘hash’]))
{
echo ‘Correct!’;
}
else
{
echo ‘Wrong answer!’;
}
}
?>
</body>
</html>
5.
Load
http://seophp.example.com/comments.php
and type an answer in the text box, as
shown in Figure 8-11.
6.
After hitting Enter, you should be told if the answer was correct or not, as shown in Figure 8-12.
191
Chapter 8: Black Hat SEO
c08.qxd:c08 10:59 191


JavaScript Editor Ajax software     Free javascripts