Re: [PHP] random string

2006-10-18 Thread eric1235711
You have an array of names and you want to choose a random name. is it? try thinking some thing about arrays, keys numbers, key count, and such Ross wrote: > > > Hi, > > I want to randomise a string > > $myrandom = rand("ross", "andrea"); > > echo $myrandom; > > > I know this doesn't wo

Re: [PHP] random string

2006-10-17 Thread Richard Lynch
On Tue, October 17, 2006 7:30 am, Ross wrote: > I want to randomise a string > > $myrandom = rand("ross", "andrea"); > > echo $myrandom; > > I know this doesn't work but is there a built in function to do this? I'm not real clear on what "this" is... Choose a string at random from an array? $pos

Re: [PHP] random string

2006-10-17 Thread Brice
On 10/17/06, Ross <[EMAIL PROTECTED]> wrote: Hi, I want to randomise a string $myrandom = rand("ross", "andrea"); I suggest : $array_name = array("rose","andrea"); $myrandom = array_rand($array_name); echo $myrandom[0]; Brice. I know this doesn't work but is there a built in function to

[PHP] random string

2006-10-17 Thread Ross
Hi, I want to randomise a string $myrandom = rand("ross", "andrea"); echo $myrandom; I know this doesn't work but is there a built in function to do this? R. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] random string

2006-10-17 Thread Ross
Hi, I want to randomise a string $myrandom = rand("ross", "andrea"); echo $myrandom; I know this doesn't work but is there a built in function to do this? R. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Random String Generation

2003-03-12 Thread John W. Holmes
> What I am trying to do is to create a email verification routine with PHP. > When people register on the site they will get an email sent to them with > a > link such as http://mysite.com/activation.php?ID=ghjghjg367ghjlkj9hjlkjhn0 > > That way when they click on the link it will verify the code

Re: [PHP] Random String Generation

2003-03-12 Thread Justin French
on 13/03/03 5:49 AM, Mike Walth ([EMAIL PROTECTED]) wrote: > Hello: > > What I am trying to do is to create a email verification routine with PHP. > When people register on the site they will get an email sent to them with a > link such as http://mysite.com/activation.php?ID=ghjghjg367ghjlkj9hjlk

Re: [PHP] Random String Generation

2003-03-12 Thread Ernest E Vogelsinger
At 19:56 12.03.2003, you said: [snip] >On Thursday 13 March 2003 02:49, Mike Walth wrote: > >You have started a new thread by taking an existing posting and replying to >it while you changed the subject. > >...etc... [snip]

Re: [PHP] Random String Generation

2003-03-12 Thread Pete James
The method I use is to take their user_id or email and create an HMAC (hashed message authentication code) by hashing it with a secret key on my end. This way the activation link looks like the following: http://mysite.com/activation.php?user_id=petej&ID=ghjghjg367ghjlkj9hjlkj THe activation scr

Re: [PHP] Random String Generation

2003-03-12 Thread Jonathan Pitcher
Mike, This is can be simple or complex depending on how complex you get. Here is an example that should work. function getRandString() { $NumOfElements = 5; // Chooses that number of elements from the Element Array $ElementArray = array(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z);

Re: [PHP] Random String Generation

2003-03-12 Thread Jason Wong
On Thursday 13 March 2003 02:49, Mike Walth wrote: You have started a new thread by taking an existing posting and replying to it while you changed the subject. That is bad, because it breaks threading. Whenever you reply to a message, your mail client generates a "References:" header that tells

[PHP] Random String Generation

2003-03-12 Thread Mike Walth
Hello: What I am trying to do is to create a email verification routine with PHP. When people register on the site they will get an email sent to them with a link such as http://mysite.com/activation.php?ID=ghjghjg367ghjlkj9hjlkjhn0 That way when they click on the link it will verify the code aga

RE: [PHP] Random string (was Header sent problem)

2003-01-17 Thread John W. Holmes
> I found that the Header already sent problem was caused by the Random > Password Generator I'm using, even if I place this function on the > bottom of the same file I'm trying to open an just call for the result. > > So, to avoid this issue, I need another method of generating a random > number

Re: [PHP] Random string (was Header sent problem)

2003-01-17 Thread Marek Kilimajer
The function is not the real problem, you just need to find any characters (even white) outside Cesar Aracena wrote: I found that the Header already sent problem was caused by the Random Password Generator I'm using, even if I place this function on the bottom of the same file I'm trying to ope

[PHP] Random string (was Header sent problem)

2003-01-17 Thread Cesar Aracena
I found that the Header already sent problem was caused by the Random Password Generator I'm using, even if I place this function on the bottom of the same file I'm trying to open an just call for the result. So, to avoid this issue, I need another method of generating a random number or string of

Re: [PHP] Random String of n Length

2001-02-13 Thread Randall Blaine Goguen
Generate a Random Password with PHP http://www.linuxguruz.org/z.php?id=305 # Note: 1. You can add more charactors, numbers or lower case charactors # to '$possible_charactors' is you wish. # 2. You can change the string length, for example, # echo 'Random_Password(16);' for 16 charactors.

[PHP] Random String of n Length

2001-02-13 Thread Jonathan Sharp
I want to generate a random string of characters of n Length...what's the easiest way to do this? Thanks, -Jonathan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators,