Jump to content

Steam XML Question


pengu

Recommended Posts

Hey guys,

 

I'm working on a little image thingy.  What I want to do, is use a URL such as ,

 

Grab data from it, put the into variables and create an image with the data.

 

I read the tutorial on this website and sort of got stuck.. with external XML files, ALSO this doesn't look like your normal XML file.

Here is the code I have thus far.. I got stuck at the 'playerstats' part..

 

<?php

$rss = new SimpleXMLElement('http://steamcommunity.com/profiles/76561197968575517/stats/L4D2/?xml=1', null, true);



foreach($rss->xpath('playerstats') as $item)

{

        echo <<<EOF

        <p> {$item->steamID64} <br />

        {$item->hoursPlayed} </p>



EOF;

}

?>

Link to comment
https://forums.phpfreaks.com/topic/216346-steam-xml-question/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.