Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Memcached Status page in PHP
<style type="text/css" media="screen">
body {
font-family: Consolas, "Lucida Console", Monaco, monospace;
table {
margin: 0 auto;
width: 500px;
caption {
font-size: 4em;
padding: 20px 0;
td {
padding: 5px;
tr td {
text-align: right;
tr td:first-child {
font-weight: bold;
width: 100px;
text-align: left;
tbody tr:nth-child(even) {
background-color: #eee;
tr:hover {
background-color: #298D84 !important;
color: #fff;
thead {
display: none;
table {
$m = new Memcached;
$host = 'localhost';
$port = 11211;
$m->addServer($host, $port);
$stats = $m->getstats()[$host.':' . $port];
foreach($stats as $key => $value):
<? endforeach; ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.