hostas2/bin/addstatus.php

19 lines
427 B
PHP
Raw Normal View History

2024-09-01 18:54:41 +00:00
<?php
require_once('./public/config.php');
$uuid = shell_exec('uuidgen');
// Have the user write the content to a temporary file
$temp_file_name = sys_get_temp_dir() . '/' . $uuid;
shell_exec("vim $temp_file_name");
$content = file_get_contents($temp_file_name);
// Clean up
unlink($temp_file_name);
$object_id = 'https://' . HOSTAS_DOMAIN . "/api/v1/object/$uuid";
$preferred_username = readline('Author username: ');