summaryrefslogtreecommitdiff
path: root/submit.php
blob: 538fee9ca82e86ce53024b83a340633b29d3bb74 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
<?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" );
    }
?>