// @return true if password and nickname match
function check_password_db($nickname,$password) {
// Here u have to include your DB connection and select!
$a=mysql_query("SELECT password FROM authme where username = '$nickname'");
if(mysql_num_rows($a) == 1 ) {
$password_info=mysql_fetch_array($a);
$sha_info = explode("$",$password_info[0]);
} else return false;
if( $sha_info[1] === "SHA" ) {
$salt = $sha_info[2];
$sha256_password = hash('sha256', $password);
$sha256_password .= $sha_info[2];;
if( strcasecmp(trim($sha_info[3]),hash('sha256', $sha256_password) ) == 0 ) return true;
else return false;
}
}
- Reply
- #14
JeffMeikle Mar 05, 2013 at 07:23 UTC - 1 likecan this be intergrated with ipboard, and if so how? thanks
- Reply
- #12
Klaypex1 Oct 18, 2012 at 19:14 UTC - 0 likes- Reply
- #11
nishe93 Oct 11, 2012 at 21:26 UTC - 1 likecan you please upload an example php page, which can be uploadet to a browser and can be used?
- Reply
- #10
d4rkwarriors Jul 08, 2012 at 00:31 UTC - 0 likes@GlabbichRulz: Go
yes u can without any problem for the plugin add it at the end of table.
if u like the project Donate
- Reply
- #9
GlabbichRulz Jul 05, 2012 at 14:45 UTC - 0 likesHey, is it possible to add one more colum (email) without confusing the Plugin?
No piracy thanks
- Reply
- #8
GlabbichRulz Jun 25, 2012 at 18:03 UTC - 0 likes@d4rkwarriors: Go
Everything else will be working?
- Reply
- #7
d4rkwarriors Jun 25, 2012 at 13:16 UTC - 0 likes@GlabbichRulz: Go
require ('config.php');
this has to be put inside function, or variable has to be declared as Global.
- Reply
- #6
GlabbichRulz Jun 24, 2012 at 14:15 UTC - 1 like@d4rkwarriors: Go
Thanks, Do you mean like this?
index.php:
http:dev.bukkit.org/paste/5650/
Config.php
http:dev.bukkit.org/paste/5649/
Could you please look and check if its working? Its my first time working with mySql and I dont want to do something wrong.
- Reply
- #5
d4rkwarriors Jun 24, 2012 at 07:15 UTC - 0 likes@GlabbichRulz: Go
in an external file config like config.php and include it in the function. Or simply add mysql connection inside that function and at the end of it mysql_close()
- Reply
- #4
GlabbichRulz Jun 12, 2012 at 18:33 UTC - 0 likesHey, Can Someone please answer me?