Jump to content

Roybot06

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Roybot06's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I am using a program called reCAPTCHA [http://www.recaptcha.com]; it is some university project that is supposed to be the best CAPTCHA out there. I don't understand too much of PHP, I understand what little it reminds me of C; but I am lost as to what I am going to do about this segment of PHP. So is that exactly what you used to make your CAPTCHA?
  2. I'm still lost to that, they made it a PHP function. As a matter of fact here is the code: <?php require_once('recaptchalib.php'); $publickey = "..."; $privatekey = "..."; # the response from reCAPTCHA $resp = null; # the error code from reCAPTCHA, if any $error = null; # are we submitting the page? if ($_POST["submit"]) { $resp = recaptcha_check_answer ($privatekey, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]); if ($resp->is_valid) { echo "You got it!"; # in a real application, you should send an email, create an account, etc } else { die("Invalid Input, you must be a spam bot.") # set the error code so that we can display it. You could also use # die ("reCAPTCHA failed"), but using the error message is # more user friendly $error = $resp->error; } } echo recaptcha_get_html($publickey, $error); ?> The problem is the submit function on this only works for submitting that form to test the text. So I need to have a global submit function or something like that to send it if they are right, and stop it all together if they aren't. Or something like I stated earlier, have a trigger from them getting this image correct and causing the actual submit button to appear. Thank you, the Javascript idea does make sense though.
  3. I am now creating a CAPTCHA image for my site to use in submitting the contact information from the "Contact Us" section. The problem lies in I don't know how to make the PHP allow for the Submit button/function to be hidden until they get the CAPTCHA image correct. I know it would be in the case somewhere, but how would I make the whole page submittable through a function in the PHP is my first problem and the second would be how do I go about hiding this function until the CAPTCHA is solved. Any input would be greatly valued.
  4. Thank you guys, I have come up with a solution for this. It took a few days, but I couldn't thank you all enough. Now to my next problem!
  5. I tried that, but I need them to randomize in sync. And I can't figure a way to tell the array to place a specific method or tag somewhere...do arrays only take a character string or can I tell it to take the "<a href =\"#"> and move it with the pictures?
  6. Okay I am creating an page using a .php array to randomize a few ads on the page. Every time it is refreshed it will either mix the three ads on the page or throw in another one. I had the idea of linking these pictures to their respective sites, but if I used an anchor tag out side the : print "<a href=\"#"><img src=\"images/".$ad_array[0]."_120x60.jpg\"></a><br><br>\n"; It will give me a fixed link, but I won't have a way of having the link move with the randomizing of the pictures. I was thinking on the lines of creating another array to move with the random pictures. I have the array set to present a word in front of the picture extension (i.e., "red" in the array will make the picture red_120x60.jpg, etc.) , and the array's code: $ad_array = array("red", "green", "blue", "magenta"); Does anyone have any suggestions, or can they tell me if what I'm thinking of is possible? Either one will be greatly valued. Thanks
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.