49 lines
1.8 KiB
PHP
49 lines
1.8 KiB
PHP
<?php
|
|
/*
|
|
* SteamGroupStatus (XML)
|
|
* Copyright (C) 2012 Maximilian "MadMakz" Lotz
|
|
*
|
|
* http://madmakz.com/
|
|
*
|
|
* This program is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 3 as published by
|
|
* the Free Software Foundation.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*
|
|
*/
|
|
|
|
$gruppe = "valve"; // Groupname at the end of http://steamcommunity.com/groups/
|
|
echo stgrp_status($gruppe);
|
|
|
|
function stgrp_status($group = false){
|
|
if(!$group){ return "<div class=\"blockrow\"><b>No group set.</b></div>"; }
|
|
|
|
$url = @simplexml_load_file("http://steamcommunity.com/groups/".$group."/memberslistxml");
|
|
if(!$url){
|
|
return "<div class=\"blockrow\"><b>Steamcommunity appears to be down.</b></div>";
|
|
}
|
|
|
|
$return = "<div class=\"blockrow\">\n";
|
|
|
|
$return .= "<a class=\"clanname\" href='http://steamcommunity.com/groups/$group' target='_blank'>".$url->groupDetails->groupName."</a>\n";
|
|
$return .= "<br>\n";
|
|
|
|
$return .= "<span class=\"resultsb\">".$url->groupDetails->memberCount." Members</span>\n";
|
|
$return .= "<br>\n";
|
|
|
|
$return .= "<span class=\"membersInGame\"><font color=#8bc53f>".$url->groupDetails->membersInGame." In-Game</font></span>\n";
|
|
$return .= "<br>";
|
|
$return .= "<span class=\"membersOnline\"><font color=#62a7e3>".$url->groupDetails->membersOnline." Online</font></span>\n";
|
|
|
|
$return .= "</div>";
|
|
|
|
return $return;
|
|
}
|
|
?>
|