Wireless Army
This is a blog / tips and tricks website for web developers and security researchers.
follow us in feedly


create md5 hash with php
by admin
 at 2019-03-06 04:30:00.

if you know php just copy past the code and use it because the fallowing lines will be the explanations of the code:
a form with an input with type submit just grabs other inputs data and then use php script to process that data refresh the page and show the results.

An action with <?php echo $_SERVER['REQUEST_URI']; ?> or or <?php echo $_SERVER['PHP_SELF']; ?> an action=”" just use the php in the same file.

<html>
<head>
<title>md5 hash</title>
</head>
<body>
<form action="<?php echo $_SERVER['REQUEST_URI']; ?>" method="post">
enter some text: <input type="text" name="input1" /><br>
<br><input type="submit" />
</form>
<?php
//md5 generate script
$str = "deafult hash";
if(isset($_POST['input1']))
{
$str = $_POST['input1'];
}
echo "<BR>";
$md5 = md5($str);
echo "md5 hash of text is: <br><br>";
echo $md5;

?>
</body>
</html>