Sr. Web Developer
mediabistro.com
US-NY-New York

Justtechjobs.com Post A Job | Post A Resume

Comments for: cash20030526

Message # 1510704:
Date: 07/17/08 18:41
By: intersting article about gd lib but
Subject: Can i chose what images g lib displays

Hi,
i am currently researhcing the net for something that sounds simple but probably isn't.

My contact form (PHP) has the usual PHP GD Lib verification code, letters and numbers.

However, my site is in CHINESE.
Sure, chinese can also see alphabetical letters embedded in an image - but they can't easily type our alphabetical letters into the verify code text box.

So i thought i need a GD Lib random code display that only delivers NUMBERS, no letters at all, this way virtually any language can reproduce the code into the veri box.

But, how can i do this???

Any idea if i can alter my PHP script to make that happen
Currently that code looks like this:
function generate_verification() {
srand((double)microtime()*1000000);
$rand = rand(0,999999999);
$thecode = substr(strtoupper(md5($rand)), 2, 5);
$thecode = str_replace("O", "A", $thecode);
$thecode = str_replace("0", "B", $thecode);
$_SESSION["thecode"] = $thecode;
}

Or is it only possible for the web hoster to mock around his PHP installation on the server to make this happen???

Thanks for a helpful answer
Rudolf

Previous Message | Next Message


Comments:
Can i chose what images g lib displaysintersting article about gd lib but07/17/08 18:41
PHP web search for imagesTim06/20/07 00:15
GD LibR.Patel02/14/06 01:05
RE: Advanced Image Editing MoComast04/18/05 16:53
Beveled textSiddhartha11/08/03 09:02
Imagemagick works betterAndrea09/11/03 16:50
Advanced Image Editing om prakash08/11/03 07:12
RE: linux/win32 PHPAnthony07/01/03 12:49
A very good articleDario Fumagalli06/09/03 09:45
linix/win32 PHPmike06/05/03 09:46
 

If you are looking for help, please post on the appropriate forum here. Your questions will be answered much more quickly.

Add A Comment:

Name:

Email:

Subject:

Message:

To reduce spam posts, messages are now manually approved

You are not [logged in]. That means your account will not get credit for this post.