Don't click here unless you want to be banned.

LSL Wiki : ExamplePhpName2Key

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are

PHP name2key

This script searches the w-hat name2key database from any webpage using file();

where %20 represents a space.

//Made by Greblak Whitfield
//2. august 2007

function name2key($name)
      define(NULL_KEY, "00000000-0000-0000-0000-000000000000");
      $key = file('' . urlencode( $name ));       
             if($key[0] != NULL_KEY)
                //Happens if it is a valid key
                echo "Your name is in the database";
                //You can also delete the above and only use the following (See use example 2 for information on how to use it)
               return $key[0];
                //Happens if the request returns NULL_KEY
                echo "Your name was not found in the database";
                return NULL_KEY;
You can put this function into a class, or another file

There are several ways to use this. Either just return true/false with the echos, or return the key which can be much more useful.
//In order to get the name variable from the URL use the following code:

//Example 1


//To return the key, use example 2:
$key = name2key($_GET['name']);

Here are some modifications to this script to see them in action go to http: In this example you type the name of the avatar in the box and press go. It returns their key. Mods by Draco Kamachi.

//Script wrote by Draco Kamachi Free for anyone to use however they want
<!-- key.php will be the page we will send the data to. -->
<form action="key.php" method="post">
Full Second Life Name:<br>
<input type="text" name="avatar" size="20"><br>
<input type="submit" value="Go!" name="go">
$avatar $_POST["avatar"];
$key file_get_contents('' .urlencode$avatar));
if (isset(

Script Library | Examples
There is no comment on this page. [Display comments/form]