SIMON Master Console Rebuild
True command center for SIMON + WEB360
This rebuild gives you a cleaner production spine: interactive tree, live viewer, guarded editor, dynamic graphics, architecture map, and note storage. It is designed to sit beside your existing
console.php
and become the stronger replacement path.
Dashboard
Tree
Viewer
System Map
File Registry
Notes
Files
15,365
Folders
427
Scanned Size
3.85 GB
PHP Files
948
Editable Text Files
12,621
File viewer
guarded to /htdocs
/live/image_proxy.php
<?php declare(strict_types=1); require_once __DIR__ . '/bootstrap.php'; $url = trim((string)($_GET['url'] ?? '')); $placeholder = function(): never { header('Content-Type: image/svg+xml; charset=utf-8'); header('Cache-Control: public, max-age=3600'); echo '<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="675"><defs><linearGradient id="g" x1="0" x2="1"><stop stop-color="#281746"/><stop offset="1" stop-color="#112c43"/></linearGradient></defs><rect width="100%" height="100%" fill="url(#g)"/><text x="50%" y="53%" text-anchor="middle" fill="#fff" font-size="72" font-family="system-ui">SIMON LIVE</text></svg>'; exit; }; if ($url === '' || !filter_var($url, FILTER_VALIDATE_URL)) $placeholder(); $parts = parse_url($url); if (!in_array(strtolower((string)($parts['scheme'] ?? '')), ['http','https'], true)) $placeholder(); $host = strtolower((string)($parts['host'] ?? '')); if ($host === '' || $host === 'localhost') $placeholder(); $ip = gethostbyname($host); if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE) === false) $placeholder(); $key = SIMON_CACHE_DIR . '/og_' . sha1($url) . '.json'; $data = simon_read_json_file($key, null); if (!is_array($data) || empty($data['image']) || (time()-(int)($data['time']??0))>86400) { $res = simon_http_get($url, ['Accept: text/html,application/xhtml+xml'], 8); $image = ''; if ($res['ok']) { $html = substr((string)$res['body'], 0, 800000); foreach ([ '/<meta[^>]+property=["\']og:image(?::secure_url)?["\'][^>]+content=["\']([^"\']+)["\']/i', '/<meta[^>]+content=["\']([^"\']+)["\'][^>]+property=["\']og:image(?::secure_url)?["\']/i', '/<meta[^>]+name=["\']twitter:image["\'][^>]+content=["\']([^"\']+)["\']/i', '/<meta[^>]+content=["\']([^"\']+)["\'][^>]+name=["\']twitter:image["\']/i' ] as $re) if (preg_match($re, $html, $m)) { $image = html_entity_decode($m[1], ENT_QUOTES|ENT_HTML5, 'UTF-8'); break; } if ($image !== '') { $image = (string)(new class($url,$image){public string $v; function __construct($base,$img){$this->v=$img;if(str_starts_with($img,'//'))$this->v=(parse_url($base,PHP_URL_SCHEME)?:'https').':'.$img;elseif(str_starts_with($img,'/'))$this->v=(parse_url($base,PHP_URL_SCHEME)?:'https').'://'.parse_url($base,PHP_URL_HOST).$img;}})->v; } } simon_write_json_file($key, ['time'=>time(),'image'=>$image]); $data=['image'=>$image]; } $image = trim((string)($data['image'] ?? '')); if ($image === '' || !filter_var($image,FILTER_VALIDATE_URL)) $placeholder(); header('Location: '.$image, true, 302); header('Cache-Control: public, max-age=86400'); exit;
Save file
Quick jump
open a path
Open