summaryrefslogtreecommitdiff
path: root/submit.php
diff options
context:
space:
mode:
Diffstat (limited to 'submit.php')
-rwxr-xr-xsubmit.php28
1 files changed, 17 insertions, 11 deletions
diff --git a/submit.php b/submit.php
index 46aa0ba..1295739 100755
--- a/submit.php
+++ b/submit.php
@@ -1,23 +1,29 @@
+<!DOCUMENT html
<html>
-<?PHP
+<head>
+ <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
+</head>
+<body>
+
+ <?php
$paste = $_POST["paste"];
- $md5sum = dechex(crc32($paste));
+ $id = dechex(crc32($paste));
- $fh = fopen($md5sum, 'w');
+ $fh = fopen($id, "w");
fwrite($fh, $paste);
fclose($fh);
- echo("<p>Paste Added: <a
-href=\"http://p.of.je/$md5sum\">
-http://p.of.je/$md5sum</a></p>");
- header("Location: http://p.of.je/$md5sum");
-?>
-<p>
- <a href="http://p.of.je/">Go Back</a>
-</p>
+ $out = "<p>Paste Added: <a href='http://p.of.je/$id'>http://p.of.je/$id</a></p>");
+ header("Location: http://p.of.je/$id");
+ ?>
+
+ <p>
+ <a href="http://p.of.je/">Go Back</a>
+ </p>
+</body>
</html>