summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Burton <philbeansburton@gmail.com>2013-02-14 13:49:07 +0000
committerPhil Burton <philbeansburton@gmail.com>2013-02-14 13:49:07 +0000
commit14629f131bc40b09c587da3d19d764cd803524e9 (patch)
tree3474fbbc430eeadb81d8662c2b5229c0b7f9fc92
parent4e8eee2f40bc4b2ba65792726c80fe470b0c24ca (diff)
made it a bit better
-rwxr-xr-xindex.php4
-rwxr-xr-xsubmit.php28
2 files changed, 19 insertions, 13 deletions
diff --git a/index.php b/index.php
index 1eb24c1..64f597c 100755
--- a/index.php
+++ b/index.php
@@ -1,15 +1,15 @@
+<!DOCUMENT html>
<html>
<head>
<title>Pastebin</title>
</head>
+ <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
<body>
<p>Paste Stuff Here!</p>
<form name="submit_paste" action="submit.php" method="post">
<textarea cols="100" rows="30" name="paste"></textarea><br />
<input type="submit" value="Submit" />
</form>
-
</p>
-
</body>
</html>
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>