Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8127489
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T07:32:55+00:00 2026-06-06T07:32:55+00:00

Ive recently get IPBoard board software for my gaming community, I converted it from

  • 0

Ive recently get IPBoard board software for my gaming community, I converted it from SMF.

When I used smf, I used a system to authorize players to register in my game servers, this script called a php script wich made a hash (sha1) of the password the player inputted in the game and sended it back to the script running in the game. Then I checked if the player was registered or not in the forum before letting him play. Well, IPBoard uses a different hash:

$hash = md5( md5( $salt ) . md5( $password ) );

Where:

$hash is the value stored in the database column members_pass_hash.
$salt is the value stored in the database column members_pass_salt.
$password is the plaintext password.

What I am trying is to make a php script that will return to the script in the game the correct hash, and I will compare it later from the game into the database. This is my code:

    <?php

include("mta_sdk.php");
$input = mta::getInput();

 // Configuración de la aplicación

$DB_SERVIDOR = 'localhost:3306';

$DB_USUARIO = 'root';

$DB_CLAVE = 'xxx';

$DB_BASEDATOS = 'ipboard';

$conexion = mysql_connect($DB_SERVIDOR, $DB_USUARIO, $DB_CLAVE);

mysql_select_db($DB_BASEDATOS, $conexion);

mysql_query("SET NAMES 'utf8'");


$sql = "SELECT members_pass_salt FROM ipb_members WHERE name = '".$input[2]."'";

$Res = mysql_query($sql, $conexion);

$rowRes = mysql_fetch_assoc($Res);


$salt = $rowRes['members_pass_salt']
$hash = md5( md5( $salt ) . md5( $input[3] ) );
//$hash = $salt;
// Return encrypted string using MD5
mta::doReturn($hash,$input[1],$input[2],$input[3],$input[4]);

?>

$input variable returns information given by the user who is attemping to play in the game. It is an array like the following:

$input[2] - the username; 
$input[3] - the password (plain text)

the other values are stuff that the game is using, not needed for this.

I succesfully call the php script from the game, and php is sending the information back, but the hash it returns is: “ERROR”

I tried many different ways of doing it but always get the same ERROR message instead the hash.

Some extra information that may be interesting to know:

The game i am talking about is Multi Theft Auto, a multiplayer modification for GTA:SA (maybe someone knows it) and it uses LUA for scripts.

The mta_sdk.php file is the sdk for php developed for this game (to be able to send and recieve information from the game using external php scripts.

Maybe this is not a convencional question. I tried to explain this as better as I can because I know you wont be used to this game and how it works.

Thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T07:32:58+00:00Added an answer on June 6, 2026 at 7:32 am

    I’m a little confused – why are you storing passwords as plaintext, and then converting them to md5 using a salt? Forgive me if I’m wrong, but that doesn’t seem like a very sensible approach.

    Try echo’ing back some data to a webpage, or storing it in a debug text file; an easy way to do this is set up a text file on your server, chmod it to 777, and include this code to write out to it;

    $debug_txt = fopen('debug.txt', 'w');
    fwrite($debug_tx, $error_here);
    fclose($debug_tx);
    

    To grab the $error_here, the easiest way to do this would be just to throw in a few if statements. i.e:

    if (mysql_select_db($DB_BASEDATOS, $conexion))    
    {    
    $sql = "SELECT members_pass_salt FROM ipb_members WHERE name = '".$input[2]."'";    
    $Res = mysql_query($sql, $conexion); 
    // Write out the results to the debugger
    // Use a foreach loop with mysql_fetch_assoc if there might be more than one entry.
    }
    else
    {
    $error_here = mysql_error();
    }
    

    etc etc.

    With the above, you should at least be able to see what exactly the error is, and be able to combat it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i've recently tried to get some Response from an URL using jQuery. Therefore I
I've recently updated to Selenium 2.24.1 to get Firefox 13 working. With this update
I've been playing around with Git recently to get a grasp of distributed version
Ive recently started using CodeIgniter as I was searching for a very lightweight framework
I've recently started using Zend Framework and I'm still pretty used to session_start, and
I've recently installed Wordpress and can't seem to get the website to display friendly
I've recently upgraded to emacs23 (Ubuntu 10.04) and I've managed to get my faces
I've recently renamed some pages on my (sinatra-backed) site. I'm redirecting from the old
I've recently tried to get the full picture about what steps it takes to
I've recently started to work with Linq to SQL and wondered how to get

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.