Get best price on Apple iPhone 11 | ||||||||||||
|
||||||||||||
|
Generate Your Wu-NameCreated: 1999-11-16 PHP Script to Generate Wu-Name The PHP script uses two plain text files, one that holds all of the adjectives and the other all of the nouns. The script reads these files into two arrays. The PHP function file(filename) reads the filename file into an array with each line being an element of the array. So next all that is needed is to randomly pick elements from these arrays. However, I don't want this to be totally random because your Wu-Name should not change each time you enter it in. Thus, I'll start the random number generator with a seed number, which will be based on the name entered. Using the PHP function srand(seed_number), which works just likes Perl's function, and generates a random number. Generating Seed Number
$seed = 0; $s=0;
for ($e=1; $e<=$len; $e++) {
$chr = substr($realname,$s,$e); $seed = $seed + ord($chr)*$e; $s=$e; } Setting up and Picking from Arrays
// set up arrays
$adj_array = file("adjs"); $noun_array = file("nouns"); // start random number with seed srand($seed); // get random numbers $arnd = rand(0,sizeof($adj_array)-1); $nrnd = rand(0,sizeof($noun_array)-1); // create name from names and arrays $wuname = "$adj_array[$arnd] $noun_array[$nrnd]";
U.S. Name Generator is another name generator which basically just switches out the adjective files. Download Full Script Here (wuname.phps)
|
privacy policy || © 1997-2016. astonishinc.com All Rights Reserved. |