9 lines
300 B
PHP
Executable File
9 lines
300 B
PHP
Executable File
|
|
<?php
|
|
header('Content-Type: application/json');
|
|
header('Access-Control-Allow-Origin: *');
|
|
$netstat = shell_exec("netstat -tn 2>/dev/null | grep ':5821' | grep ESTABLISHED | awk '{print \$5}' | cut -d: -f1 | sort -u | wc -l");
|
|
$count = intval(trim($netstat));
|
|
echo json_encode(['count' => $count]);
|
|
|