Jump to content

XML problem


LostKID

Recommended Posts

Hi Guys Im using XML to pull in information from a URL. I have managed to do fine pulling in single nodes to string just fine but now im wanting to pull in repeated nodes in different parent nodes. The reason for the is because i need to pull in thumbnail images for every game played in the list and display them as a list, here is the XML i am using:

 

http://xboxapi.duncanmackenzie.net/gamertag.ashx?GamerTag=LK%20LostKID

 

and here is the page where the information goes:

 

http://www.brokenbox.co.uk/MY/page.php?id=11

 

but where you see the error in the bottom right hand side is where this code is:

 

<?
$query9 = "SELECT gamert FROM user WHERE id = '$_GET[id]'";
$results9 = mysql_query($query9) or die ("Could not execute query");
while ($row9 = mysql_fetch_array($results9)){
extract($row9);

$rss =  simplexml_load_file('http://xboxapi.duncanmackenzie.net/gamertag.ashx?GamerTag='.$gamert);

foreach ($rss->XboxUserGameInfo->Game->Image32Url as $movie) {
   		echo "$movie";
}
}
?>

 

i have been looking for some documentation to help me with this but havent found any yet.

Link to comment
https://forums.phpfreaks.com/topic/174890-xml-problem/
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.