Welcome Guest, Not a member yet? Register   Sign In
CodeIgniter 2.0.2 CAPTCHA help / Tutorial?
#1

[eluser]kdawson[/eluser]
Hi All,
I'm very new to CodeIgniter and must say that I am very happy with it, mid way through my first application.

If I could just figure out how to get the captcha going, I'd be well on my way.

I have searched around and I find lots for the older version. I can see the similarities, but really could use a walk through.


Does anyone know of a good tutorial that can walk a guy like me , step by step, through the process of getting it going and validating?

Thank you.

Regards.
Ken
#2

[eluser]ηυмвєяσηє[/eluser]
first, go http://www.google.com/recaptcha and get your public and private keys.

download attached zip file. It includes samples.
put the files in right places.

open config file : enter your keys.
#3

[eluser]kdawson[/eluser]
Hi ,thanks and that's a good captcha but, doesn't CodeIgniter 2.0.2 have its own CAPTCHA built in? 'create_captcha($data)"
http://ellislab.com/codeigniter/user-gui...elper.html

That's the one I'm trying to use. The one you example is a good one, but I'd like to take advantage of the in-house CodeIgniter 2.0.2 CAPTCHA if possible...


Does anyone know how to use it, or know of a good tutorial that walks through setting it up and getting it going?


Thank you.
#4

[eluser]Pascal Kriete[/eluser]
The documentation you linked to has a usage example.

If it's unclear, I'd like to get it fixed up. Which part are you struggling with?
#5

[eluser]kdawson[/eluser]
I have it working except the image is not working or writing to the file folder.
I have the proper permissions for the folder etc.

That's why I ask if there is a Step by Step Tutorial, because I have something wrong.

If there was one, that would be nice.


Regards,
Ken
#6

[eluser]NordicElf[/eluser]
I need some help on getting the captcha helper to work. Not sure what I'm doing wrong, it only returns false! no errors, no array, just false.

On my local set up I'm running WAMP. I checked gd library is installed and activated. I tried on my host servers (linux) same story.

this is my code:
Code:
$this->load->helper('captcha');

                $vals = array(
                'img_path'  => $_SERVER["DOCUMENT_ROOT"] . 'captcha/',
                'img_url'  => site_url().'captcha/',
                'img_width'  => '200',
                'img_height' => 30,
                'border' => 0,
                'expiration' => 7200
                );
                var_dump($vals);
                 // create captcha image
                $cap = create_captcha($vals);
                var_dump($cap);

the dumps produce;

Code:
array (size=6)
  'img_path' => string 'C:/wamp/www/captcha/' (length=20)
  'img_url' => string 'http://localhost/auth_test/captcha/' (length=35)
  'img_width' => string '200' (length=3)
  'img_height' => int 30
  'border' => int 0
  'expiration' => int 7200

boolean false

I have the folders set up with permissions.

Help!
#7

[eluser]kdawson[/eluser]
Why are these to i different location ?

C:/wamp/www/captcha/
http://localhost/auth_test/captcha/

Where is the fonts folder too?

Just suspected because, like I said before- "That was the biggest issue I found. Getting the directory structure right."
#8

[eluser]NordicElf[/eluser]
Yip, that was it. I'd forgotten auth_test in the url. Can't believe I couldn't see it!

Thanks!

do you use db to store your captcha word or sessions?
I was hoping to use sessions but I'm battling to get it to persist. Maybe I'll just do the db way.
#9

[eluser]kdawson[/eluser]
Glad I could help.

Yes, the images are dynamically created, stored, and destroyed on the server folder, and they are cross referenced with the info saved in the database.

Good luck.
#10

[eluser]Unknown[/eluser]
What can I find the control of server folder?




Theme © iAndrew 2016 - Forum software by © MyBB