Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

CAPTCHA Will Not Validate


  • Please log in to reply
5 replies to this topic

#1 Fett 1138

Fett 1138

  • Members
  • 32 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Texas
  • Local time:06:35 PM

Posted 22 November 2009 - 01:43 PM

I realize I've been asking quite a few questions lately and I apologize for that but hopefully this will be my last.

On my guestbook at http://www.fett1138.net/guestbook.php I have a CAPTCHA, that CAPTCHA functions, but does not validate, the validation code is on 'verify.php' along with all the comments, I'm getting quite a bit of spam and would like to fix that by the CAPTCHA. I used captcha.cc and their "Simple/Scriptless IP-Based Validation" (see http://www.captcha.cc/faq.html#valid ).

Thanks,
Fett 1138 :thumbsup:

BC AdBot (Login to Remove)

 


#2 KamakaZ

KamakaZ

  • Members
  • 739 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Victoria
  • Local time:10:35 AM

Posted 26 November 2009 - 07:26 AM

Try learning a bit of php, can make a rather simple CAPTCHA using php and a bit of AJAX.

I have used this one in the past which works rather well, http://recaptcha.net/plugins/php/

Another thing you could try is in my guestbook code it allows for blacklisting posts containing specific words, this is turned off by default. Simply search through the code, it's easy to find...


Good Luck,

~ Kam

There's no place like 127.0.0.1
There are 10 types of people in the world, those that can read binary, and those who can't.


#3 Fett 1138

Fett 1138
  • Topic Starter

  • Members
  • 32 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Texas
  • Local time:06:35 PM

Posted 02 December 2009 - 06:18 PM

I've been playing around with it and I believe I may have found the problem, but I'm not sure.
If I look at verify.php, I get the message "Fatal error: Function name must be a string in /home/content/f/e/t/fett1138/html/verify.php on line 2". I used the code below to validate...

<?php
$CID = $_ENV{HTTP_CLIENT_IP} ? $_ENV{HTTP_CLIENT_IP} : $_ENV{REMOTE_HOST}; $ok = include
("http://www.captcha.cc/val.cgi?cap_k=$KEY&cap_c=$CID&cap_t=".urlencode($_POST('cap_t')));
?>

I believe that the problem may have to do with "http://www.captcha.cc/val.cgi" being "non-accessible" or something (but then that's on line three rather than two).

I have been trying to learn php, but this instance confuses me since I've tried to put the code everywhere that seems vaguely possible and it either kills the whole page, or does absolutely nothing.

I'm also trying to get the spam filter to work but I'm still pretty slow as far as php goes.

Thanks,
Fett 1138

#4 KamakaZ

KamakaZ

  • Members
  • 739 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Victoria
  • Local time:10:35 AM

Posted 02 December 2009 - 07:58 PM

there was actually a spam filter built into the code you downloaded from me...

i'm only guessing, but i'm 99% sure the problem is you are trying to include a remote file, i had trouble with this for ages and couldn't figure it out. Try researching that... I think it's turned of by default as it's a security risk or something, someone else might be able to comment more on this.

There's no place like 127.0.0.1
There are 10 types of people in the world, those that can read binary, and those who can't.


#5 KamakaZ

KamakaZ

  • Members
  • 739 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Victoria
  • Local time:10:35 AM

Posted 04 December 2009 - 02:30 AM

i think, can't remember off the top of my head, but i also think my spam filter was calling the definitions using the same function that you are having trouble with now...

There's no place like 127.0.0.1
There are 10 types of people in the world, those that can read binary, and those who can't.


#6 KamakaZ

KamakaZ

  • Members
  • 739 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Victoria
  • Local time:10:35 AM

Posted 04 December 2009 - 08:25 AM

I have updated my form to support the following:
- Blank field check
- Option for blacklisted words in comment field (SPAM checking)
- Captcha with audio for vision impaired users

An example is avaliable here (click on the 3rd option to view or the 'download' link to download).

I have also removed any <? include() ?> refferences to external files which should fix the problem you were having with this captcha. Let me know how things go :thumbsup:


~ Kam

There's no place like 127.0.0.1
There are 10 types of people in the world, those that can read binary, and those who can't.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users