diff options
author | wjoe <joe@lc8n.com> | 2012-07-31 15:50:36 +0100 |
---|---|---|
committer | wjoe <joe@lc8n.com> | 2012-07-31 15:50:36 +0100 |
commit | 4e8eee2f40bc4b2ba65792726c80fe470b0c24ca (patch) | |
tree | 01711d87e7bc799d386f55fe0734acd284eefdc6 |
Initial commit
-rw-r--r-- | .htaccess | 1 | ||||
-rwxr-xr-x | index.php | 15 | ||||
-rwxr-xr-x | submit.php | 23 |
3 files changed, 39 insertions, 0 deletions
diff --git a/.htaccess b/.htaccess new file mode 100644 index 0000000..8f50046 --- /dev/null +++ b/.htaccess @@ -0,0 +1 @@ +ForceType text/plain diff --git a/index.php b/index.php new file mode 100755 index 0000000..1eb24c1 --- /dev/null +++ b/index.php @@ -0,0 +1,15 @@ +<html> + <head> + <title>Pastebin</title> + </head> + <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 new file mode 100755 index 0000000..46aa0ba --- /dev/null +++ b/submit.php @@ -0,0 +1,23 @@ +<html> +<?PHP + + $paste = $_POST["paste"]; + $md5sum = dechex(crc32($paste)); + + $fh = fopen($md5sum, '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> +</html> + + |