Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <form action="?p=blog&mode=view&id=<?php echo $kid ?>&action=commentpost" method="post" id="commentform">
- <label for="form-name">Name (erforderlich)</label><br />
- <input name="form-name" id="name" type="text" required>
- <label for="form-email"><br />Email (erfordlich)</label><br />
- <input name="form-email" id="email" type="email" required>
- <label for="form-url"><br />Homepage</label><br />
- <input name="form-url" id="url" type="url">
- <label for="form-comment" class="middle"><br />Dein Kommentar</label><br />
- <textarea name="form-comment" id="comment"></textarea>
- <br />Spamschutz:
- <?php
- require_once('core/include/recaptchalib.php');
- // Get a key from https://www.google.com/recaptcha/admin/create
- $publickey = "6Lfpvs4SAAAAANMGgRw6HQUBYp1Bc89-IO6TB-fb";
- $privatekey = "6Lfpvs4SAAAAAGH7bNbO-ItVzjlWbuouO-JfuGGk";
- # the response from reCAPTCHA
- $resp = null;
- # the error code from reCAPTCHA, if any
- $error = null;
- # was there a reCAPTCHA response?
- if (!empty($_POST["recaptcha_response_field"])) {
- $resp = recaptcha_check_answer ($privatekey,
- $_SERVER["REMOTE_ADDR"],
- $_POST["recaptcha_challenge_field"],
- $_POST["recaptcha_response_field"]);
- if ($resp->is_valid) {
- echo "You got it!";
- } else {
- # set the error code so that we can display it
- $error = $resp->error;
- }
- }
- echo recaptcha_get_html($publickey, $error);
- ?>
- <br />
- <input class="button" type="submit" value="Kommentar eintragen" />
- </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement