SharkBait Posted March 10, 2006 Share Posted March 10, 2006 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. Quote Link to comment https://forums.phpfreaks.com/topic/4645-authorization-code-generation/ Share on other sites More sharing options...
AndyB Posted March 10, 2006 Share Posted March 10, 2006 Tutorial?Create random 'security word' and store in SESSION varGet 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] Quote Link to comment https://forums.phpfreaks.com/topic/4645-authorization-code-generation/#findComment-16256 Share on other sites More sharing options...
SharkBait Posted March 13, 2006 Author Share Posted March 13, 2006 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?? Quote Link to comment https://forums.phpfreaks.com/topic/4645-authorization-code-generation/#findComment-17081 Share on other sites More sharing options...
SharkBait Posted March 13, 2006 Author Share Posted March 13, 2006 I fixed it.Just re-ran the update and install for yum php-gd. Restarted httpd and voila, worked.:) Quote Link to comment https://forums.phpfreaks.com/topic/4645-authorization-code-generation/#findComment-17116 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.