Skip to content

Instantly share code, notes, and snippets.

@EhsanCh
EhsanCh / fpm_get_status.php
Created February 19, 2023 10:54
PHP-FPM real-time status page (Single file without the need for web server configuration)
<?php
// Upload to private url or implement authorization...
if (isset($_GET["json"])) {
header("Content-type: application/json");
exit(json_encode( fpm_get_status() ));
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!--