Skip to content

Instantly share code, notes, and snippets.

@robyfirnandoyusuf
Created May 29, 2025 17:10
Show Gist options
  • Select an option

  • Save robyfirnandoyusuf/87e3753d4ac4a4059e100666405931d0 to your computer and use it in GitHub Desktop.

Select an option

Save robyfirnandoyusuf/87e3753d4ac4a4059e100666405931d0 to your computer and use it in GitHub Desktop.
receiver digispark
<?php
$profile = isset($_GET['name']) ? $_GET['name'] : 'unknown';
$profile = preg_replace('/[^a-z0–9_\-]/', '', strtolower($profile));
$filename = "logs/" . $profile . ".bin";
if (!is_dir("logs")) {
 mkdir("logs", 0755, true);
}
file_put_contents($filename, file_get_contents('php://input'));
http_response_code(200);
echo "Saved as $filename";
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment