Khalsa Labs

Generate md5 hash in PHP

Generate md5 hash in PHP is small line code.You can embed the code for generate md5 hash in PHP website or even your PHP blog. md5 is the one way hash method. It is used mostly for calculate checksums of text or objects.

md5 is also popular,because of its use in UNIX/LINUX password storing,as the LINUX stores password as md5 hash of actual password given by user.

Here is a small web script in php for generate md5 hash from text.

<form action="" method="post">
<p>enter text here: <input type="text" name="t1" /></p>
<p><input type="submit" /></p>
//md5 generate script
$str = "deafult hash";
$str = $_POST['t1'];
echo "<BR>";
$md5 = md5($str);
echo "md5 hash of text is: <br><br>";
echo $md5;
//tested at skillsyard

just write the text and save the file as md5.php

The following two tabs change content below.
Python Developer and DIY lover.

want to comment ??

Your email address will not be published. Required fields are marked *