{
"status": "error",
"message": "Неверный токен!",
"post_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3MTQ3MzQyODAsImp0aSI6IlFaQmhUMWxMeGpvSUE3QWkxT3BtNFJ2U2tyNC9OeVc0M211U09Fdlg0a1U9IiwiaXNzIjpmYWxzZSwibmJmIjoxNzE0NzM0MjgwLCJleHAiOjE3MTUzMzkwODAsInVzZXJJZCI6IjEifQ.dZxPzMQDEyi-NuZF6fVTigOvnXbeh7GTtU5HP2YH27I",
"post_message": "test",
"post_subbtopic_id": 45
}
$user = $_POST['domain'];
$dir = "/var/www/example.com/{$user}";
mkdir($dir, 0755, true);
$text = "<meta charset='utf-8'/> Сайт успешно создан";
$fp = fopen("/var/www/example.com/{$user}/index.html", "w");
fwrite($fp, $text);
fclose($fp);