LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-02-2003, 07:15 PM   #1
johnyy
Member
 
Registered: Jun 2003
Posts: 92

Rep: Reputation: 15
php ??


hello, i try to look for php information to build a Word Verification when user come in my web site and sign up account, I has been doing some research but can't find non, hope to find some info here.. ...

just like yahoo.
http://edit.yahoo.com/config/eval_re...&promo=&.last=

the part where say Enter the word as it is shown in the box below.


thanks
 
Old 11-02-2003, 08:04 PM   #2
gradedcheese
Member
 
Registered: Nov 2003
Posts: 59

Rep: Reputation: 15
So basically what you want to do is generate a pseudorandom word as a string and then use a php graphics library to generate an image that contains the word from that string in it?

Sounds kind of cool actually. I can probably do the first part but I don't know PHP's graphics libraries. They are documented though, have you tried looking around on http://www.php.net/ to see if you can find some fucntions for generating images on the fly?
 
Old 11-02-2003, 09:17 PM   #3
simplico
Member
 
Registered: Jul 2003
Location: Orlando, FL
Distribution: mandrake 10
Posts: 62

Rep: Reputation: 15
here is the php graphic script i use to generate images on the fly. php.net has tons more!!

in this php file you could create an algorithm that generates a random sequence of letters, encrypt it, and then have the image decrypt word and print?? if that makes any sense.

<?

header ("Content-type: image/png");
$im = @ImageCreate (400, 75) or die ("Cannot Initialize new GD image stream");
$input = $_GET["input"];
$font = "/usr/X11R6/lib/X11/fonts/drakfont/ttf/sylfaen.ttf";
$background_color = ImageColorAllocate ($im, 255, 255, 255);
$text_color = ImageColorAllocate ($im, 233, 14, 91);
ImageTTFText($im, 60, 0, 10, 55, $text_color, $font, $input);
Imagepng ($im);
Imagedestroy($im);

?>

//?input=
//and u might want to change the font location to suit ur needs.

so, to use this script, type in

filename.php?input=text
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Are PHP session variables held in memory when you leave a PHP site? Locura Programming 11 11-16-2008 08:37 PM
php5 apache2 mysql4 don't work, php does not seem to read php.ini atom Linux - Software 5 03-24-2005 11:05 AM
php apache or php cgi - php learner rblampain Linux - Security 3 12-17-2004 11:10 PM
PHP -- How to execute a shell script from PHP using FTP functions?? zoonalex Programming 3 07-29-2004 11:51 AM
Updating php 4.3.1 from tar and keeping current php configuration with mandrake 9.1 mrjeep Linux - General 0 04-02-2003 07:50 AM


All times are GMT -5. The time now is 12:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration