• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net
managed wordpress hosting

MD5 Generator

Fear_It

Active Member
Hi,

I'm looking for a MD5 Generator script for my site as I run a gameserver which creates userbars (for forum sigs) with their ingame stats but the file creates their username in MD5

So I need a generator which they can put in their exact username to get their MD5 file name for their forum sig userbar.

Does anyone know where I could find one?

Thanks
 
MD5 wouldn't be the best option for this, but...

Create a form with a username field, send that through PHP, doing something like:

PHP:
<?php

$username = $_POST['username'];
$md5_gen = md5($username);
echo $md5_gen;

?>
 
Do you know if it's possible to do it using a jot form code?

As i'm no coding expert (even if it is simple :eek:)

Code:
<script src="http://www.jotform.com/min/g=jotform&3.1.1" type="text/javascript"></script>
<script type="text/javascript">

   JotForm.init();
</script>
<link type="text/css" rel="stylesheet" href="http://www.jotform.com/css/styles/form.css?v3"/>
<link href="http://www.jotform.com/css/calendarview.css" rel="stylesheet" type="text/css" />
<style type="text/css">
    .form-label{
        width:150px !important;
    }
    .form-label-left{
        width:150px !important;
    }
    .form-line{
        padding:10px;
    }
    .form-label-right{
        width:150px !important;
    }
    .form-all{
        width:650px;
        background:#FFFFFF;
        color:#000000 !important;
        font-family:Verdana;
        font-size:12px;
    }
</style>

<form class="jotform-form" action="http://www.jotform.com/submit.php" method="post" name="form_2384219563" id="2384219563" accept-charset="utf-8">
    <input type="hidden" name="formID" value="2384219563" />
    <div class="form-all">
        <ul class="form-section">
            <li id="id_3" class="form-input-wide">
                <div class="form-header-group">
                    <h2 id="header_3" class="form-header">
                        Userbar Generator
                    </h2>
                </div>
            </li>
            <li class="form-line" id="id_1">
                <label class="form-label-left" id="label_1" for="input_1"> Username </label>
                <div id="id_1" class="form-input">
                    <input type="text" class="form-textbox" id="input_1" name="q1_username" size="20" />
                </div>
            </li>
            <li class="form-line" id="id_2">
                <div id="id_2" class="form-input-wide">
                    <div style="margin-left:156px" class="form-buttons-wrapper">
                        <button id="input_2" type="submit" class="form-submit-button">
                            Get Userbar Code
                        </button>
                    </div>
                </div>
            </li>
            <li style="display:none">
                Should be Empty:
                <input type="text" name="website" value="" />
            </li>
        </ul>
    </div>
    <input type="hidden" id="simple_spc" name="simple_spc" value="2384219563" />
    <script type="text/javascript">
        document.getElementById("si" + "mple" + "_spc").value = "2384219563-2384219563";
    </script>
</form>
 
All forms are the same, that still processes to submit.php.

It still has that field for the username there

HTML:
<input type="text" class="form-textbox" id="input_1" name="q1_username" size="20" />

As with the code above I posted, instead of $_POST['username'] it would be $_POST['q1_username']
 
PHP:
<?php 

$username = $_POST['username']; 
$md5_gen = md5($username); 
echo $md5_gen; 

?>
Why not;
PHP:
<?php
echo md5($_POST['username']);
?>

OR even a simple 1 liner for the whole script.;
PHP:
<?php
((isset($_POST['username']) ? echo md5($_POST['username']) : echo "<form method=\"POST\" action=\"".$_PHP_SELF."\"><input type=\"text\" name=\"username\" /> <input type=\"submit\" value=\"Encryptify\" /></form>");
?>
Basically, that will show the form needed to submit the username for encryption if the person has not already sent the username, if they have already pressed submit, then it will display the MD5 encrypted username. :evilb:
 
Back
Top