|
|

Api Stats Module Example Another API Example. |
This was designed to show user how a module works. It gets the information from the user, it lets you know when users are online, it collects their avatar, and the amount of points.
<?php
include("api.php");
$api_key = "XXXXXXXXXXXXXXXX"; # Api you receive
$ownerid = $_GET['ownerid']; # The Owner Viewing The Module
$userid = $_GET['userid']; # The User Viewing the Module
$array = api_get_data($api_key,"members.info(".$userid.")"); # Gets the members info
$seenapi_get_data($api_key,"members.last_seen(".$userid.")"); # Gets the users last seen
echo'<span class="quote"><tbody><tr class="standardrow"> <th colspan="3"><font size=""><b>';
$onlinetatus = $seen['0']; # Determines if user is online or not
if ($onlinetatus == 'true') {
echo "<a title='User Is Online'><b class=green>.</b></a>"; # If user online is true
} else {
echo "<a title='User Is Offline'><b class=gray>.</b></a>"; # If User is not online its false
}
echo " ".$array['name']."'s Stats Box<br>"; #Displays Users Name
echo '</font><tr class="standardrow_dark"><td>';
echo "<a title='".$array['name']."'><img src='http://image.hazardstrip.com/av/".$array['avatar']."'>"; # Get users Avatar
echo '<th colspan="3">'.$array['user_title'].'</b><br>'; # Gets users title
echo " Points: ".$array['points']." "; Gets users points
echo'<tr class="standardrow"><th colspan="3">';
echo "".$seen['2'].""; # Display what user is currently viewing
echo "</tr>";
echo '</table></tbody></tr>';
?>
|
| Published by Aceman . 9 months ago |
 Add Comment You must login or register to access this! |
 .Thinkin outside the box. ;) Want more? Find related pages. |