Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 01-24-2010, 09:54 AM
Quillink Quillink is offline
Member
 
Join Date: Dec 2008
Posts: 93
Credits: 11,297
Quillink
Lightbulb Answered | Installing CAPTCHA - Where to put these two PHP codes?

Hey guys,

[Please see next post. You can download my register.php from this one, i fit will help]

Thanks VERY much in advance,
- Quillink
Reply With Quote
  #2  
Old 01-27-2010, 12:13 AM
Quillink Quillink is offline
Member
 
Join Date: Dec 2008
Posts: 93
Credits: 11,297
Quillink
Default RE: Installing "Securimage CAPTCHA" - need help placing two sections of code (PHP)

Ok I think the prospect of downloading and following a tutorial is chasing people away, so I'll try a different approach:


Can anyone help me with placing these two code extracts in my register.php? It's the validation process for my Securimage CAPTCHA:

Code:
include_once $_SERVER['DOCUMENT_ROOT'] . '/securimage/securimage.php';

$securimage = new Securimage();
And

Code:
if ($securimage->check($_POST['captcha_code']) == false) {
  // the code was incorrect
  // handle the error accordingly with your other error checking

  // or you can do something really basic like this
  die('The code you entered was incorrect.  Go back and try again.');
}

Alternatively, does anyone know of a simpler CAPTCHA process? Maybe one you made yourself?

Thanks in advance
Reply With Quote
  #3  
Old 01-27-2010, 04:45 PM
BMR777 BMR777 is offline
Member
 
Join Date: Jan 2011
Posts: 1,122
Gender: Male
Credits: 10,729
BMR777 is on a distinguished road
Default RE: Installing CAPTCHA - Where to put these two PHP codes?

I would suggest ReCaptcha:

http://recaptcha.net/

Adding that would be super easy.

To use the one you are using though, maybe something like...

Find:

PHP Code:
else{

    
//We are attempting to register the user...

    //First MD5 hash the passwords:

    
$pass1 md5($pass1);
    
$pass2 md5($pass2); 
Replace With:

PHP Code:
else{

    
//We are attempting to register the user...

include_once $_SERVER['DOCUMENT_ROOT'] . '/securimage/securimage.php';

$securimage = new Securimage();

    
//First MD5 hash the passwords:

    
$pass1 md5($pass1);
    
$pass2 md5($pass2); 
Find:

PHP Code:
    else if($tos != "yes"){

    
//User did not agree to TOS
    
$article_title "Terms of Service Error";
    
$article_content $notos;

    } 
Replace With:

PHP Code:
else if($tos != "yes"){

    
//User did not agree to TOS
    
$article_title "Terms of Service Error";
    
$article_content $notos;

    }
else if(
$securimage->check($_POST['captcha_code']) == false){

// The captcha is wrong, put your message here...

$article_title "Captcha Incorrect";
$article_content "Captcha Incorrect";


Try that and see if it works. :)
Reply With Quote
  #4  
Old 01-27-2010, 11:24 PM
Quillink Quillink is offline
Member
 
Join Date: Dec 2008
Posts: 93
Credits: 11,297
Quillink
Default RE: Installing CAPTCHA - Where to put these two PHP codes?

Thanks Brandon, it's all working now. :D

I don't know how I missed it before, I forgot to edit the
Code:
include_once $_SERVER['DOCUMENT_ROOT'] . '/securimage/securimage.php';
to point to where I put the file. It wasn't working because it's in another directory..!

Always one sentence of code that'll cost you hours, isn't it lol?


Thanks again.
Reply With Quote
  #5  
Old 01-28-2010, 02:02 AM
SieghartZeke SieghartZeke is offline
Member
 
Join Date: Oct 2009
Posts: 149
Credits: 10,138
SieghartZeke
Default RE: Answered | Installing CAPTCHA - Where to put these two PHP codes?

Ehm wait a moment...i don't know where you can download ReCaptcha!
Im registrated, added my site to the list...but...WHERE IS THE DOWNLOAD LINK???
Reply With Quote
  #6  
Old 01-28-2010, 08:56 AM
Tequila's Avatar
Tequila Tequila is offline
The Grim One
 
Join Date: Jan 2009
Location: Souther Tier, New York State
Posts: 1,356
Gender: Female
Credits: 97,374
Tequila is on a distinguished road
Default RE: Answered | Installing CAPTCHA - Where to put these two PHP codes?

Quote:
Originally Posted by SieghartZeke
Ehm wait a moment...i don't know where you can download ReCaptcha!
Im registrated, added my site to the list...but...WHERE IS THE DOWNLOAD LINK???
All the information is available on the Resources page.
Quote:
There are three ways to use reCAPTCHA: with an application plugin, with a library for your programming language, or with the web-based API. The following resources will help you find the correct method to add our CAPTCHA in your environment.
I'll try installing later on, still have cleaning to do.
Reply With Quote
  #7  
Old 01-28-2010, 09:26 AM
SieghartZeke SieghartZeke is offline
Member
 
Join Date: Oct 2009
Posts: 149
Credits: 10,138
SieghartZeke
Default RE: Answered | Installing CAPTCHA - Where to put these two PHP codes?

And what of this i need to choose??
Reply With Quote
  #8  
Old 01-29-2010, 01:22 AM
Seapyramid Seapyramid is offline
Premium Member
 
Join Date: Feb 2009
Posts: 373
Gender: Female
Credits: 15,591
Seapyramid
Default RE: Answered | Installing CAPTCHA - Where to put these two PHP codes?

Try reading & learning.. the info is there if you want it.
Reply With Quote
  #9  
Old 01-29-2010, 03:46 AM
SieghartZeke SieghartZeke is offline
Member
 
Join Date: Oct 2009
Posts: 149
Credits: 10,138
SieghartZeke
Default RE: Answered | Installing CAPTCHA - Where to put these two PHP codes?

IM Italian and some thing I don't know...i have only 14 years,,,
Reply With Quote
  #10  
Old 01-29-2010, 07:26 AM
Tequila's Avatar
Tequila Tequila is offline
The Grim One
 
Join Date: Jan 2009
Location: Souther Tier, New York State
Posts: 1,356
Gender: Female
Credits: 97,374
Tequila is on a distinguished road
Default RE: Answered | Installing CAPTCHA - Where to put these two PHP codes?

Quote:
Originally Posted by SieghartZeke
IM Italian and some thing I don't know...i have only 14 years,,,
Try looking at this blog post on how to use it with PHP (which is what I'm doing first). I wish I could recommend a good free translation service, but none of them convey correctly (take it from an artist who has to send Cease and Desist letters to people outside of the English speaking community).
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Captcha / reCaptcha / Anti-Bot Question Lone Wolf Suggestions and Feature Requests 5 04-23-2011 12:18 AM
How to add a Re captcha Code in Register Page? SieghartZeke Questions and Supports 5 10-09-2009 03:35 AM
Help with installing a theme [Answered] RipJawWolfFang Questions and Supports 10 05-22-2009 10:06 PM
BB CODES zhiichiro Questions and Supports 4 03-24-2009 05:52 PM
New idea for CAPTCHA? lupus6x9 Other Chat 8 08-19-2008 02:16 AM


All times are GMT -5. The time now is 03:48 PM.

Currently Active Users: 9282 (0 members and 9282 guests)
Threads: 4,080, Posts: 32,024, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636