AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   Steam Group XML help ? (https://forums.alliedmods.net/showthread.php?t=277518)

SychO 01-10-2016 13:10

Steam Group XML help ?
 
Greetings,

i have a problem with my steam group XML,, the thing is that there is 105 members but in the XML

the members SteamIDs shown are very lower than 105

How can i see all steam ids ?

http://steamcommunity.com/groups/dza...listxml/?xml=1

Thank YOU

Mitchell 01-10-2016 14:18

Re: Steam Group XML help ?
 
Probably because it's outdated.
look into Web API

SychO 01-10-2016 14:51

Re: Steam Group XML help ?
 
i checked the Web API i can't find anything about group members

Impact123 01-10-2016 15:26

Re: Steam Group XML help ?
 
I can see all members with chrome and firefox. Try the show source function if you can't.

SychO 01-10-2016 15:47

Re: Steam Group XML help ?
 
oh,, i am really sorry it appears that the problem was in my browser,,

well,, i have another problem then,, the php codes that i am using

and i am a very beginner

the page takes long to load

what could be the problem

and i am sorry again

Akuba 01-10-2016 16:57

Re: Steam Group XML help ?
 
If you need php, you could use this. I use this method to get various information for my Server: http://pastebin.com/uxBMMFaS
replace YOURGROUPNAME with the customurl you gave your steamgroup.
It is requiered that your host has it enabled that file_get_contents can access other websites. If not, it will not work, regradless which method you will choose.

Also, if you do not post your code, we cannot help you.

Side Note: You should stick to xml as much as possible, I just use the above method because informations I need are not available in xml or with the api.

Disowned 01-11-2016 15:58

Re: Steam Group XML help ?
 
If you're trying to see if a user is apart of a specific group in a script, you could also use 'Steam_RequestGroupStatus(client, groupAccountID);' from the SteamTools extension. This would allow you to kick users based on groups by checking their group status in the 'OnClientConnect' forward.

SychO 01-12-2016 12:39

Re: Steam Group XML help ?
 
let me explain to you what i have exactly done,

Request info from the group XML, the XML shows the members SteamIDs,

and i want to make a page where the group members are shown with their names avatars and stat

like this

PHP Code:


$steamurl 
"http://steamcommunity.com/groups/groupid";


       
$xml file_get_contents($steamurl.'/memberslistxml/');
    if(
strpos($xml,'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01')===FALSE){
    
$parsed simplexml_load_string($xml);

                    foreach (
$parsed->members->steamID64 as $mem) {
                
                
$xml file_get_contents('http://steamcommunity.com/profiles/' .$mem'/?xml=1');
                
$parsed simplexml_load_string($xml); 

and that successfully showed the group members, if you want the online page link i can post it

the problem is that the page takes time loading,, the more members in the group the more load time

WildCard65 01-12-2016 13:24

Re: Steam Group XML help ?
 
Quote:

Originally Posted by SychO (Post 2382563)
let me explain to you what i have exactly done,

Request info from the group XML, the XML shows the members SteamIDs,

and i want to make a page where the group members are shown with their names avatars and stat

like this

PHP Code:


$steamurl 
"http://steamcommunity.com/groups/groupid";


       
$xml file_get_contents($steamurl.'/memberslistxml/');
    if(
strpos($xml,'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01')===FALSE){
    
$parsed simplexml_load_string($xml);

                    foreach (
$parsed->members->steamID64 as $mem) {
                
                
$xml file_get_contents('http://steamcommunity.com/profiles/' .$mem'/?xml=1');
                
$parsed simplexml_load_string($xml); 

and that successfully showed the group members, if you want the online page link i can post it

the problem is that the page takes time loading,, the more members in the group the more load time

Of course it's going to take time to load for the following reason:
1) When you request the webpage, the webserver executes the php code on itself.
2) The php code tells the server to initiate a web request to the url for the group's member list.
3) The server then waits(pauses php execution) until the webserver it's contacting returns a web response.
4) The php code once it receives the xml response then parses it.
Steps 5 to 7 repeat for each member in the steam group:
5) The php code tells the server to initiate a web request to the member's profile
6) The server then waits(pauses php execution) until the webserver it's contacting returns a web response for the member's profile.
7) Once it has the profile xml, it then parses it.

SychO 01-12-2016 13:45

Re: Steam Group XML help ?
 
so basically there is no way to make this work better is there ?


All times are GMT -4. The time now is 09:58.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.