This one lists all account names, (still with .ini but they are trying to fix that)
PHP Code:
<b>Total Number of Accounts:</b>
<?php
$directory = opendir("ENTER SEA ACCOUNT DIRECTORY HERE");
while($item = readdir($directory)){
if(($item != ".") && ($item != "..")){
$files[] = $item;
echo "";
}
}
$sizeofarray = count($files);
echo $sizeofarray;
?>
<br>
PHP Code:
<br>
<b>List of accounts:</b></br>
<?php
// directory path can be either absolute or relative
$dirPath = 'ENTER SEA ACCOUNT DIRECTORY HERE';
// open the specified directory and check if it's opened successfully
if ($handle = opendir($dirPath)) {
// keep reading the directory entries 'til the end
while (false !== ($file = readdir($handle))) {
// just skip the reference to current and parent directory
if ($file != "." && $file != "..") {
if (is_dir("$dirPath/$file")) {
// found a directory, do something with it?
echo "[$file]<br>";
} else {
// found an ordinary file
echo "$file<br>";
}
}
}
// ALWAYS remember to close what you opened
closedir($handle);
}
?>
Code:
C:\Storage\
Next one show if the server is online or not:
Just mod the: $fp = fsockopen("SERVER IP", 80, $errno, $errstr, 2);
where "Server ip", port (could also be 15779 if you only wanna show the sro server status), $errno, $errstr, default timeout in sec.)"
PHP Code:
<?php
error_reporting(0);
$fp = fsockopen("SERVER IP", 80, $errno, $errstr, 2);
if (!$fp)
{
echo '<FONT COLOR=red>Offline</FONT>';
}
else
{
echo '<FONT COLOR=green>Online</FONT>';
}
fclose($fp);
?>