Hi,
I have this xml; http://steamcommunity.com/id/suxxez/?xml=1 (example)
and Im now looking to get the data from the profile->onlineState node and put it into an php array to use on my website. How can I do this?
Thanks,
Tom
get data from XML
Moderator: General Moderators
Re: get data from XML
sorted it myself 
final code:
final code:
Code: Select all
$fetch_steam_status = 'http://steamcommunity.com/profiles/'.$ds['steam_id_name'].'/?xml=1';
$xml = simplexml_load_file($fetch_steam_status);
$steam_nickname = $xml->steamID;
$steam_status = $xml->onlineState;
$steam_status_msg = $xml->stateMessage;
$steam_play_time = $xml->hoursPlayed2Wk;