summaryrefslogtreecommitdiff
path: root/submit.php
blob: 5c4da1198dd311eed652ad06aa8737adf0463f46 (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");
    }
?>