Skip to content

Instantly share code, notes, and snippets.

@PJZ9n
Created March 19, 2019 10:55
Show Gist options
  • Save PJZ9n/cfaff187a2b958a13841a9f54f251150 to your computer and use it in GitHub Desktop.
Save PJZ9n/cfaff187a2b958a13841a9f54f251150 to your computer and use it in GitHub Desktop.
<?php
if ($_SERVER["REMOTE_ADDR"] !== "123.456.789.012") {
$ec = array(
"ip" => $_SERVER["REMOTE_ADDR"],
"status" => "error",
"error" => "Access Denied",
);
echo json_encode($ec, JSON_PRETTY_PRINT);
exit();
}
file_put_contents("./cpu.txt", $_GET["physical"] . "||" . $_GET["core0"] . "||" . $_GET["core1"] . "||" . $_GET["core2"] . "||" . $_GET["core3"] . "||" . $_GET["time"]);
$ec = array(
"ip" => $_SERVER["REMOTE_ADDR"],
"status" => "success",
"error" => "None",
);
echo json_encode($ec, JSON_PRETTY_PRINT);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment