Checking groups with the Steam API [PHP]

Asked

Viewed 84 times

1

1 answer

2

Only add "memberslistxml/? xml=1" at the end of the URL.

This makes the page return an XML that you can "pull" with Curl and Xmlsimpleobject.

The full link would be:

http://steamcommunity.com/groups/NewSteamCommunityBeta/memberslistxml/?xml=1

@EDIT

There are, on the group page, some tags that end up showing the id of this group: inserir a descrição da imagem aqui

You can try to access it from file_get_contents('urldogrupo'); and then with a preg_match(); capture this information.

  • The problem is that if I do this for each gid it returns "Maximum Execution time of 30 Seconds exceeded" and does not complete the check.

  • @Robertlang you can try to optimize your code to run faster or increase the PHP Xecution Time Maximum or Make a database with Groupids on your server.

  • @Robertlang I just looked and, in the source code of the page, there are some places that end up showing the group ID. I will update the answer with this information.

  • I took advantage of this idea that you told me to get the information directly from the page and I saw that it would be easier to check whether the user is a member or not through the "Join Group" button with a preg_match, the problem is that it always returns the "Join Group" even when I’m already a member of the group.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.