Jump to content

jholder

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

jholder's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi All, I'm attempting to parse some XML and am having some trouble It seems that I'm grabbing the elements correctly, but they don't seem to be assigning themselves. When I try to echo the value, there's nothing. It's probably some novice error (i'm new to PHP), so any help would be greatly appreciated! $fp = fopen("MY URL HERE", "r"); if ($fp) { echo "Made the check!\n"; while (!feof($fp)) $gamerfeed .= fgets($fp); if ($gamerfeed != '') { $dom = new DomDocument(); $dom->recover=true; @$dom->loadXML($gamerfeed); $RecentGames = $dom->getElementsByTagName('ArrayOfGame')->item(0); $HasEvents = false; // Loop through each Game within RecentGames foreach($RecentGames->getElementsByTagName('Game') as $GameNode) { $HasEvents = true; // Get the Game Attributes from within RecentGames $Name = $GameNode->getElementsByTagName('Title')->textContent; echo($Name); It doesn't echo the name! Here's the XML I'm grabbing: <?xml version="1.0"?> <ArrayOfGame> <Game> <Id>NPWR00449_00</Id> <IdGameEurope>75</IdGameEurope> <Title>Uncharted: Drakes Fortune</Title> </Game> </ArrayOfGame> I'm still learning parsing, so sorry if it's obvious thanks! john
  2. Hi all, this is kind of a weird question. I have an extension loaded into php.ini. I would like this module to not be loaded in a virtual host, and needs to be loaded runtime, meaning we have to put it in .htaccess. Easy, right? Well, here's the kicker: There isn't a key to disable the particular key/class we don't want. So now my question: Is there a way to disable a module by name in the .htaccess file? We could disable it in php.ini, then call it for each virtual domain, but that is resource intensive. Thanks!!
×
×
  • 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.