Final Fantasy Republic Forums  
 Home | Forums | Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
     
    
        
     
 
Final Fantasy Republic Forums  
Username:

Password:
CAPTCHA:
  
        
Closed Thread
 
LinkBack Thread Tools Display Modes
  Ogre Samanosuke
 
 
Ogre Samanosuke's Avatar
SUCK A DUCK! >=O
 
Posts: 136
 
Reg: Dec 29 2002
 
ID: 4372
 
RP: 0
 
FFT
ohGr
Fight Club
Blade of the Immortal
PS2
     
 
Default  You know you're bored when....
01.11.03, 20:41:09
  Post #1 (permalink)
 
     

you have nothing better to do than make **** like this for NO REASON AT ALL.
PHP Code:
function randpass($length){
$chars '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
$password "";
for(
$i=1;$i<=$length;$i++){
$rand rand(1,strlen($chars));
$password.=$chars{$rand};
}
return 
$password;

I got bored yesterday and thought of making a pass restore function for users. I wanted them spawned randomly, and came up with that little gem. lol (Remember now, I'm a NON-vBoard users :P)

Oh yeah, go check it out.
______________________________________



SoulAngel MB | The Blargh | Assault Battle info
Send a message via AIM to Ogre Samanosuke Send a message via Yahoo to Ogre Samanosuke   Ogre Samanosuke is offline
View Ogre Samanosukes Profile! Find more posts by Ogre Samanosuke! Visit Ogre Samanosukes Homepage!  
  Pocketx
 
 
Pocketx's Avatar
Registered User
 
Posts: 966
 
Reg: Jul 31 2002
 
ID: 1634
 
RP: 0
 
NBA 2k Series
Eminem
8 Mile, Rush Hour Series
Dreamcast
     
 
Default  01.11.03, 23:57:00
  Post #2 (permalink)
 
     

Cool, nice work!

dont for get the opening php and closing php tags just incase someone is new to PHP
  Pocketx is offline
View Pocketxs Profile! Find more posts by Pocketx! Visit Pocketxs Homepage!  
  Solid
 
 
Solid's Avatar
Registered User
 
Posts: 387
 
Reg: May 05 2002
 
ID: 742
 
RP: 0
 
Final Fantasy,Golden Sun
Avril Lavigne
SpiderMan
I don't like to read
Ps 2
     
 
Default  01.12.03, 05:08:21
  Post #3 (permalink)
 
     

lol...it's abc for php
______________________________________

Visit the home for extreme experience in final fantasy!!

Final Fantasy eXtreme
Send a message via AIM to Solid   Solid is offline
View Solids Profile! Find more posts by Solid! Visit Solids Homepage!  
  rake
 
 
rake's Avatar
Sorceror|Supreme
 
Posts: 1,269
 
Reg: Jan 15 2002
 
ID: 4
 
RP: 0
 
None
None
None
None
     
 
Default  Re: You know you're bored when....
01.12.03, 08:29:44
  Post #4 (permalink)
 
     

Quote:
Originally posted by LarryTheLooter
you have nothing better to do than make **** like this for NO REASON AT ALL.
PHP Code:
function randpass($length){
$chars '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
$password "";
for(
$i=1;$i<=$length;$i++){
$rand rand(1,strlen($chars));
$password.=$chars{$rand};
}
return 
$password;

I got bored yesterday and thought of making a pass restore function for users. I wanted them spawned randomly, and came up with that little gem. lol (Remember now, I'm a NON-vBoard users :P)

Oh yeah, go check it out.


why bother with that functions, which, from the look of it, uses a few extra microseconds than necessary when you can generate a random string based on current time with that function.... hmm.. what's the name of it..... lol. ok, i can't remember the name of the function, but i'm sure there is one. It would be much easier:
> seed the random number generator, based on microsecond
> get string
> md5 string
> use substr to get the desired length.
______________________________________


Send a message via ICQ to rake Send a message via AIM to rake   rake is offline
View rakes Profile! Find more posts by rake! Visit rakes Homepage!  
  Ogre Samanosuke
 
 
Ogre Samanosuke's Avatar
SUCK A DUCK! >=O
 
Posts: 136
 
Reg: Dec 29 2002
 
ID: 4372
 
RP: 0
 
FFT
ohGr
Fight Club
Blade of the Immortal
PS2
     
 
Default  01.12.03, 08:30:46
  Post #5 (permalink)
 
     

If someone doesn't know to do that, they need a swift kick to the head. :P
Send a message via AIM to Ogre Samanosuke Send a message via Yahoo to Ogre Samanosuke   Ogre Samanosuke is offline
View Ogre Samanosukes Profile! Find more posts by Ogre Samanosuke! Visit Ogre Samanosukes Homepage!  
  Shift
 
 
Shift's Avatar
uniku3.on3
 
Posts: 820
 
Reg: Apr 17 2002
 
ID: 553
 
RP: 250
 
WoW
ABK
Akira
Eh.
PC
     
 
Default  01.12.03, 12:06:25
  Post #6 (permalink)
 
     

So you need a swift kick in the head?

-Shift
______________________________________

Send a message via AIM to Shift Send a message via MSN to Shift Send a message via Yahoo to Shift   Shift is offline
View Shifts Profile! Find more posts by Shift! Visit Shifts Homepage!  
  Ogre Samanosuke
 
 
Ogre Samanosuke's Avatar
SUCK A DUCK! >=O
 
Posts: 136
 
Reg: Dec 29 2002
 
ID: 4372
 
RP: 0
 
FFT
ohGr
Fight Club
Blade of the Immortal
PS2
     
 
Default  01.12.03, 16:31:09
  Post #7 (permalink)
 
     

Well, I could of used gettimeofday() but I didn't. Mostly because doing in this fashion may waste MICROSECONDS (whoopdy) and I can control what characters go in to the string, as with MD5ing it, you ONLY get hex hash. With this, you get the whole alphabet, as well any characters you want to add or remove. Not to mention multiple instances, if you really wanted to be stupid. There was a reason for the way I did it. :P

Anyway, I'm happy with my way of doing things.

Last edited by Ogre Samanosuke : 01.12.03 at 17:37:11.
Send a message via AIM to Ogre Samanosuke Send a message via Yahoo to Ogre Samanosuke   Ogre Samanosuke is offline
View Ogre Samanosukes Profile! Find more posts by Ogre Samanosuke! Visit Ogre Samanosukes Homepage!  
  rake
 
 
rake's Avatar
Sorceror|Supreme
 
Posts: 1,269
 
Reg: Jan 15 2002
 
ID: 4
 
RP: 0
 
None
None
None
None
     
 
Default  01.13.03, 12:45:56
  Post #8 (permalink)
 
     

my way or the highway, eh?
Send a message via ICQ to rake Send a message via AIM to rake   rake is offline
View rakes Profile! Find more posts by rake! Visit rakes Homepage!  
Closed Thread



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
What do you do if you're bored in FFR? AVF281 Costa del Sol 56 01.17.03 04:08:00
Bored when I made something good... nothing_special Graphical Asylum 1 01.03.03 05:59:31
I got Really Bored... Arnaion Graphical Asylum 13 01.02.03 23:37:36
BoReD.... Karnage General Final Fantasy Discussion 10 08.03.02 17:21:13
wicked bored Cappa Graphical Asylum 18