Jump to content

Archived

This topic is now archived and is closed to further replies.

SharkBait

Authorization Code Generation

Recommended Posts

Hi,

I've been looking and I have not any tutorials about making a script for generating those authorization/access codes with the GD.

I've found places that give people scripts to do it, but I am more interesting in following some sorta tutorial about how this works.

Thanks.


Share this post


Link to post
Share on other sites
Tutorial?

Create random 'security word' and store in SESSION var
Get session var and use in a php script with GD to generate the image (bells and whistles optional)
Check form responses to see if user-entered 'security word' matches what's stored in the session variable.

That's about it. The rest you should be able to learn from reading scripts ... which may depend on how well-written and/or documented they are. Mine is beautifully written and spectacularly well-documented :) Help yourself/take a look if you're interested - [a href=\"http://www.digitalmidget.com/php_noob/captcha.php\" target=\"_blank\"]http://www.digitalmidget.com/php_noob/captcha.php[/a]

Share this post


Link to post
Share on other sites
The code you have it great.

Though, I dont seem to have imagecreatefromjpeg() which tells me GD isnt enabled in PHP. I can not find any mention of GD in phpinfo().

I installed GD onto the server. It was able to make the gddemo.png and a couple of other files.

My php version seems to be 5.0 but no where in the php.ini file does it show extension=php_gd2 in it.

How do I go about enabling GD in PHP? I've used getimagesize() and I thought that was a function of GD?

Do I have to recompile PHP with enabling GD support??

Share this post


Link to post
Share on other sites
I fixed it.

Just re-ran the update and install for yum php-gd. Restarted httpd and voila, worked.

:)

Share this post


Link to post
Share on other sites

×

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.