summaryrefslogtreecommitdiff
path: root/submit.php
blob: 32702324184fb9cf8f75f37c6b6d4d384c6bc3ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<?php
    if(isset($_POST["paste"] && $_POST["paste"] != "" ) {
        $paste = $_POST["paste"];
        $id = dechex(crc32($paste));
        $fh = fopen($id, "w");
        fwrite($fh, $paste);
        fclose($fh);
        header("Location: http://p.of.je/$id");
    }
    else
    {
        header("Location: http://p.of.je");
    }
?>