setSafeMode(true);
$text = $Parsedown->text($_POST['text']);
$text = preg_replace('/(.)\n(.)/', '$1
$2', $text); // respect single line breaks
$text = str_replace('
', '
', $text); // but don't add them between paragraphs $time = time(); $message = "$time $text\n"; file_put_contents('messages.txt', $message, FILE_APPEND); $web_header = "
This, friend, is a Collins. It’s a simple microblog you can set up on your own server in 30 seconds. You can find out more here.
Sure thing. Easy color changes are in the preferences section of index.php
. Feel free to modify the HTML as well!
On the web: That textbox above? Just enter your text and your password.
Via curl:curl -d "text={your message}&password={your password}" -X POST ".URL."index.php
To make it even easier, add a collins.sh
file to your computer, with this on one line:curl -d "text=$1&password={your password}" -X POST ".URL."index.php
Then, you can post from your command line like this:
sh collins.sh 'Heading to the Mountain Goats tonight. Hoping they play Last Man On Earth!'
You’ll need to SSH in to your server and find the $"."password
value at the top of index.php
.
Also, we recommend adding it to your password manager!
Sure! But you’ll need to SSH in to your server, find the right line in messages.txt
and edit/delete it there. We believe in you.
Hi, me. Charlie Park. charliepark.org
Yyyyes, but I’m terrible at email, so I can’t promise I’ll get back to you. Sorry! Email is my first name at my domain.