That size should be fine, I will be putting it on my 3 other sites as well so perhaps traffic will increase! I am trying to write a registration program (you fixed it for me) that will verify that someone is using the same name as they are in the game second life because it will interact with several communication programs I plan to launch, and I don’t want someone pretending to be someone else. I have moved to the verification part, and I have the in world program wrote so it sends the owners name of te verification device to the php and the php converts it to key then compares it, that way it can not be fooled without inside knowledge here is an example URL
http://www.sltrinkets.com/pro/pro.php?d … %20Kamachi
Thats a dead link on purpose. Heres the program that receives it
[php]
<?php
$data = $_GET['data'];
$key = file_get_contents('http://w-hat.com/name2key/?terse=1&name=' .urlencode( $data));
$link = mysql_connect("localhost", "protected_protected", "protected") or die('Could not connect: ' . mysql_error());
echo 'Connected successfully';
mysql_select_db("protected_protected") or die('Could not select database');
$query = mysql_query("SELECT * FROM users WHERE username = '".$data."'")or die(mysql_error());
$result = mysql_query($query) or die('Query failed: ' . mysql_error());
//find $data in the username section of the database, becuase it is a name if not found return error
//if found get the key from the same line, if the key matches $key write a 1 to the verify of the same line
//echo for testing purposes
echo "
n";
while ($line = mysql_fetch_array($result, MYSQL_ASSOC))
{
echo "tn";
foreach ($line as $col_value)
{
echo "tt$col_value | n";
}
echo "t
n";
}
echo "
n";
mysql_free_result($result);
mysql_close($link);
echo "success";
?>
[/php]
Now I have not tested that it is straight from notepad, I can almost guarantee Ill be getting sql errors, if you see some point them out, but I need to know how to do something.
That should find the username and print the whole line of the database its on, I need to know how to only print the key Is that possible? Thanks!