Hello, i'm working on a system where a player in an online game (counterstrike) can link they're online game account to their forum account.
I can do everything else but the linking PHP code.
What I want to do is make an external PHP page that receives the queries from the game server. It receives the players input, their forum user name and password. In the external PHP page, I want to use the user name and password given and check it against the MySQL tables for vBulletin. I tried MD5 hashing the raw password from the query, but it is different from the MD5 in the database.
Is there some other type of hashing that vBulletin uses? A snippit of code would be great!
This is what I have now, And I always get 0 rows returned because the passwords are differet.... (I know I am entering the correct password

)
PHP Code:
<?php
//Link.php - Grabs username+pass input from gameserver and checks it against the DB.
$mysql = mysql_connect(******);
mysql_select_db(***);
$user = $_GET['u'];
$pass = $_GET['p'];
$steamid = $_GET['s'];
$hashpass = md5($pass);
$check = mysql_query("SELECT * FROM user WHERE username='$user' AND password='$hashpass'");
if(mysql_num_rows($check) == 0){
die("notfound");
}else{
$row = mysql_fetch_array($check);
mysql_query("UPDATE userfield SET steamid='$steamid' WHERE userid='$row[userid]'");
echo "pass";
}
thank you for your help in advance!