Created
January 18, 2015 12:42
-
-
Save DarrylDias/b4d7465d7876456f4856 to your computer and use it in GitHub Desktop.
An MD5 generator written in PHP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php error_reporting(0); | |
if (isset($_POST['content'])) { | |
if (!empty($_POST['content'])) { | |
$hash = md5($_POST['content']); | |
} | |
} | |
?> | |
<!DOCTYPE html> | |
<html lang="en-US"> | |
<head> | |
<meta charset="utf-8" /> | |
<title>{{ MD5 Generator }}</title> | |
<style type="text/css"> | |
body, input { font: 0.9em Tahoma, sans-serif; } | |
.title { font-weight: normal; } | |
.container { width: 100%; max-width: 600px; text-align: center; margin: 0 auto; } | |
input { padding: 10px; background: #ffffff; border: 1px solid #ccc; margin: 0;} | |
input[type="text"] { width: 300px; } | |
.output { border: 1px solid #ccc; padding: 10px;} | |
</style> | |
</head> | |
<body> | |
<div class="container"> | |
<h1 class="title">MD5 Generator</h1> | |
<form action="index.php" method="post"> | |
<input type="text" name="content" placeholder="Enter some text" /> | |
<input type="submit" name="submit" value="Hash!"> | |
</form> | |
<div> | |
<p class="output"><?php echo $hash; ?></p> | |
</div> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment