MyBB Community Forums

Full Version: mybb - phpsge bridge
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello!

i want to make a bridge to phpsge

what is phpsge? php strategy game engine is an opensource cms, and whit it you can create your strategy browsergame.
you can find it on source forge: https://sourceforge.net/projects/phpstrategygame/

phpsge use the md5() hasch for passwords.

function login($username,$password) {
		session_start();
		$q = "SELECT * FROM ".TB_PREFIX."users where username = '$username'";
		$result = mysql_query($q);
		$dbarray = mysql_fetch_array($result);
		if($dbarray['password'] == md5($password)) {
			$_SESSION['nik']=$dbarray['username'];
			$_SESSION['log']="y";
			$_SESSION['id']=$dbarray['id'];
			header ("Location: main.php");
		}
		else {
			return false;
		}

i don't now how mybb hasch the password, can you help me?
MyBB uses a randomly generated salt on each user's password. You'll need to make changes to one script or the other for this to work.

MyBB:
md5(md5($salt).md5($passwd))

phpsge:
md5($passwd)
thakyou it works fine! i will use mybb as official forum cms for phpsge
Raffa, can you post the bridge? I am interested in using it actually.