Rating:
by MadMakz, Wednesday, November 30th 2011, 11:20pm
![]() |
PHP Source code |
1 2 3 4 |
$error_reporting = error_reporting();
error_reporting(0);
<!-- code -->
error_reporting($error_reporting);
|
![]() |
PHP Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
<?php
$gruppe = "meine_steam_gruppe"; // Der Gruppenname hinter http://steamcommunity.com/groups/
echo stgrp_status($gruppe);
function stgrp_status($group = false){
if(!$group){ return false; }
$error_reporting = error_reporting();
error_reporting(0);
$url = file_get_contents('http://steamcommunity.com/groups/'.$group);
$default_socket_timeout = ini_get("default_socket_timeout");
ini_set("default_socket_timeout", 0);
if($http_response_header[0] != "HTTP/1.1 200 OK"){
error_reporting($error_reporting);
ini_set("default_socket_timeout", $default_socket_timeout);
return "<div class="blockrow"><b>Steamcommunity appears to be down.</b></div>";
}
error_reporting($error_reporting);
ini_set("default_socket_timeout", $default_socket_timeout);
preg_match('#<h1>(.+)</h1>#sU', $url, $aMatches);
$return = "<div class="blockrow">";
$return .= "<table>";
$return .= "<a class="clanname" href='http://steamcommunity.com/groups/$group' target='_blank'>$aMatches[1]</a>";
$return .= "<br>";
preg_match('#<div class="groupMemberRow">(.+)</div>#sU', $url, $aMatches);
$aMatches = str_replace('class="linkStandard"', 'class="linkStandard" target="_blank"', $aMatches[1]);
$pieces = explode(" ", $aMatches);
$domain = strstr($pieces[3], '>');
$strip1 = substr($domain, 1);
$return .= "<span class="resultsb">$strip1 Members</span>";
$return .= "<br>";
$domain1 = strstr($pieces[6], '>');
$strip2 = substr($domain1, 1);
$return .= "<span class="membersInGame"><font color=#8bc53f>$strip2 In-Game</font></span>";
$return .= "<br>";
$domain2 = strstr($pieces[9], '>');
$strip3 = substr($domain2, 1);
$return .= "<span class="membersOnline"><font color=#62a7e3>$strip3 Online</font></span>";
$return .= "</table>";
$return .= "</div>";
return $return;
}
?>
|
Wednesday, February 26th 2014, 11:47pm
Sunday, March 17th 2013, 11:09am
Saturday, February 23rd 2013, 6:54pm
Monday, January 14th 2013, 10:55am
Thursday, September 27th 2012, 2:05am
by Nitro (Nov 18th 2014, 2:47pm)
by DeaD_EyE (Aug 25th 2013, 3:28am)
by MadMakz (Oct 16th 2012, 12:04am)
by NacKteOmA (Sep 29th 2012, 5:34pm)
by MadMakz (Sep 28th 2012, 12:51am)
by HSFighter Feb 8th 2011, 7:32pm