Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function isingarnetgroup( $playerid, $url )
- {
- $random = rand();
- if ( !isset( $url ) )
- {
- $url = 'http://steamcommunity.com/groups/garnetgaming/memberslistxml/?xml=1&r=' . $random;
- }
- else
- {
- $url = $url . $random
- }
- $group = simplexml_load_file( $url, 'SimpleXMLElement', LIBXML_NOWARNING ); // i guess this is the right way to do it
- if ( !$group )
- {
- die( 'group error' );
- }
- $groupusers = $group->members;
- $isingroup = false;
- foreach ( $groupusers->steamID64 as $userid ) // fuckin loops confusin me n shit
- {
- if ( $userid == $playerid )
- {
- $isingroup = true;
- break; // Break the gay ass loop
- }
- }
- // Checking the next page if available
- if ( $group->nextPageLink && $found == false )
- {
- $found = isingarnetgroup( $playerid, ( string )$group->nextPageLink . '&r=' . $random );
- }
- return $found;
- }
- echo( ( string )isingroup( 76561198089465570, 'http://steamcommunity.com/groups/garnetgaming/memberslistxml/?xml=1&r=' ) );
- if ( !isset( $_POST[ 'playerid' ] ) )
- {
- return;
- }
- $apikey = '3C662D6DDF7CC31B603C96D82224EDE4';
- $playerid = $_POST[ 'playerid' ];
- echo( isingarnetgroup( $playerid ) );
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement