<html>
<head>
<style type="text/css">
.steamcontainer { background: #333333;
width: 210px;
border: 1px solid #555555;
height: 105px;
padding: 5px;
-moz-border-radius: 8px;
border-radius: 8px;}
.avatar { -moz-border-radius: 5px;
border-radius: 5px;}
.steamidcss {
font-family: Arial;
color: #ffffff;
margin: 0px;
padding: 0px;
font-size:10px;
overflow: hidden;
width: 100%;
}
.steamfloat { float: left; margin: 3px;
}
.clearit { clear:both; }
.id {font-size:20px; }
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
</style>
</head>
<body>
<?php
/* Steam Community Widget
*/
error_reporting(0);
//Variables. Edit Profile URL to match the link to your personal Steam Community Page.
$ProfileURL = 'http://steamcommunity.com/id/';
$getit = $_GET['SteamID'];
$profilelink = 'http://steamcommunity.com/id/' . $getit . '/';
$xmlurl = $ProfileURL . $getit . '?xml=1';
$xml = simplexml_load_file($xmlurl);
if (!$xml) {
echo "Failed loading Steam profile";
}
else {
//Begin Widget Content
echo '<div class="steamcontainer"><div class="steamidcss">';
echo '<div class="steamfloat"><img src="' . $xml->avatarMedium . '" class="avatar">
</div>';
echo '<div class="steamfloat"><div class="id">' . $xml->steamID . '</div>';
echo '<strong>Joined:</strong> ';
echo $xml->memberSince . '<br /><strong>Rating:</strong> ';
echo $xml->steamRating . '<br /><strong>Played:</strong> ';
echo $xml->hoursPlayed2Wk . 'hrs in 2 weeks</p></div><div class="clearit"></div>';
for($i = 0; $i < 1; $i++){
if ($xml->mostPlayedGames->mostPlayedGame[$i]->gameLink != "") {
echo '<div class="steamfloat">
<a href="' . $xml->mostPlayedGames->mostPlayedGame[$i]->gameLink . '">
<img src="' . $xml->mostPlayedGames->mostPlayedGame[$i]->gameIcon . '" />
</a> </div> Most played game is ' . $xml->mostPlayedGames->mostPlayedGame[$i]->gameName . '
for ' . $xml->mostPlayedGames->mostPlayedGame[$i]->hoursPlayed . ' hrs</p>';
}
}
echo '</div></div>';
}
//End Widget Content
?>
</body>
</html>