Poor man’s view of the world

A humble tribute to ToGg – the Great God of Technology

MD5 calculator using php

This is a very simple php code for an MD5 calculator.

There are two pages, index.htm and md5.php The index.htm page contains a simple form to submit the text to be hashed. The md5.php page displays the md5 hash result.
code for index.htm

<form action=md5.php method=get>
<input type="text" name="word">
<input type=submit value="Hash this text">
</form>

code for md5.php

<?php
$str = $_REQUEST["word"];
?>
Original text entered by you:
<?php echo $_REQUEST["word"]; ?>
The md5 hash for this text is:
<?php echo md5($str); ?>

To see a working demo of this code, visit: | http://www.rohasnagpal.com/projects/md5-calculator

Categories: Open Source