Username:    Password:        Click Here To Signup     Forgotten Password
Main Menu
Online
Members: 0

Guests: 11

110.85.x.x news
173.199.x.x dilbertplus
175.44.x.x forum
199.21.x.x forum
222.77.x.x forum
36.248.x.x forum
5.63.x.x news
54.235.x.x forum
66.249.x.x user
84.2.x.x request
94.23.x.x forum

Last Seen

Dodgeitorelse Thu 07:32
BYTM Thu 06:05
LPmrOsWDGl Thu 06:03
game_stats.eu Thu 06:01
Zipps Thu 04:14

Newest Members

Forums
mkden
Fri Jun 04 2010, 06:26PM Quote

Posts: 102
Joined: Sun Feb 07 2010, 02:10AM
Registered Member #5780
GonzoR wrote ...

subria wrote ...

Я тоже за

Ну чтобы не оффтопить по-левому - интересуют такие вопросы:
1) Кто-нибудь "дорабатывал" скрипт под те игрушки, на которые Rich еще не доделал/не захотел делать? В частности интересует вопрос по мониторингу Live For Speed и PvPGN серверам (на joomla 1.5)
2) Какие игровые серваки запущены у вас?

1)Я думаю врятли
2)Я держу серв ксс,ты об этом?



вот код для PvPGN


/*
Author:  U-238 (mark@darkterrorsdomain.cjb.net)                                                   
Adapted for skillz: J4ck (j4ck@molod.ru)
*/
 
 
// Path to server.dat
$statusfile = '/usr/local/bnetd/var/status/server.dat';
 
// What info should be shown?
$show = array(
    'STATUS' => true,
    'USERS' => true,
    'GAMES' => false,
    'CHANNELS' => false,
);
 
// URL of directory containing the game icons.  No trailing slash.
$iconsdir = "/pstat/gameicons";
 
// Enable profile links?
$profilelink_enable = true;
$profilelink_url = "/pvpgn/index.php";    // URL to pvpgn-stats
 
// Language constants.  Translate into your native language if needed.
$language = array(
    'STATUSDETAIL'   => 'PvPGN Статус',
    'USERSDETAIL'    => 'Пользователи [online]',
    'GAMESDETAIL'    => 'Игры [online]',
    'CHANNELSDETAIL' => 'Channels currently online',
 
#    'Version'        => 'PvPGN version',
    'Uptime'         => 'Аптайм',
    'Users'          => 'Пользователей',
    'Games'          => 'Игр',
#    'Channels'       => 'Channels',
#    'UserAccounts'   => 'User accounts',
 
    'none'           => 'None',
);
 
// !
 
function parse_statusfile($filename) {
    $ini_array = array();
    $lines = file($filename);
 
    #var_dump($lines);
 
    foreach($lines as $line) {
        $line = trim($line);
        if ($line == "") {
            continue;
        } else if ($line[0] == "[" && $line[strlen($line) - 1] == "]") {
            $sec_name = substr($line, 1, strlen($line) - 2);
        } else {
            $pos = strpos($line, "=");
            $property = substr($line, 0, $pos);
            $value = substr($line, $pos + 1);
            if ($sec_name == 'USERS' || $sec_name == 'GAMES') {
                list($ini_array[$sec_name][$property]['ctag'],$ini_array[$sec_name][$property]['name']) = explode(',',$value);
            } else {
                $ini_array[$sec_name][$property] = $value;
            }
        }
    }
    return $ini_array;
}
 
function namedisplay($user) {
    global $profilelink_enable, $profilelink_url;
    if ($profilelink_enable && $user['ctag'] != 'CHAT') {
        return "<a href=\"".$profilelink_url."?game=".$user['ctag']."&user=".$user['name']."\">".$user['name']."</a>";
    } else {
        return $user['name'];
    }
}
 
$status_array = parse_statusfile($statusfile);
 
$output = "<table cellspacing=\"0\">\n";
foreach ($show as $type => $show) {
    if ($show == true) {
        $output .= "  <tr>\n";
        $output .= "    <td colspan=\"2\">\n";
        $output .= "      <strong>".$language[$type.'DETAIL']."</strong>\n";
        $output .= "    </td>\n";
        $output .= "  </tr>\n";
        if ($status_array[$type] == true) {
            foreach ($status_array[$type] as $key => $value) {
                if ($type == 'STATUS') {
                    if (isset($language[$key])) {
                    $output .= "  <tr>\n";
                    $output .= "    <td colspan=\"2\">\n";
                    $output .= "      ".$language[$key].": ".$value."\n";
                    $output .= "    </td>\n";
                    $output .= "  </tr>\n";
                    }
                } else {
                    $output .= "  <tr>\n";
                    if ($type != 'CHANNELS') {
                        $output .= "    <td width=\"1%\">\n";
                        $output .= "      <img src=\"".$iconsdir."/".$value['ctag'].".jpg\">\n";
                        $output .= "    </td>\n";
                        $output .= "    <td>\n";
                        if ($type == 'USERS') {
                            $output .= "      ".namedisplay($value)."\n";
                        } else {
                            $output .= "      ".$value['name']."\n";
                        }
                        $output .= "    </td>\n";
                        $output .= "  </tr>\n";
                    } else {
                        $output .= "  <tr>\n";
                        $output .= "    <td colspan=\"2\">\n";
                        $output .= "      ".$value."\n";
                        $output .= "    </td>\n";
                        $output .= "  </tr>\n";
                    }
                }
            }
        } else {
            $output .= "  <tr>\n";
            $output .= "    <td colspan=\"2\">\n";
            $output .= "      <strong>".$language['none']."</strong>\n";
            $output .= "    </td>\n";
            $output .= "  </tr>\n";
        }
        $output .= "  <tr>\n";
        $output .= "    <td colspan=\"2\" height=\"7\">\n";
        $output .= "    </td>\n";
        $output .= "  </tr>\n";
    }
}
$output .= "</table>\n";
return $output;


сам не пробывал так что разберайся сам!



Website
 

Jump:     Back to top

Begin New Thread

Quick Reply:

 


You are not logged in - Click Here To Signup

Username:    Password:   

Mini Buttons

.... © GreyCube.com - Richard Perry - Powered by e107.org