Quote:
Originally Posted by SychO
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.