Jump to content

Recommended Posts

Hello all,

 

Please forgive my inexperience. Hopefully this is an easy question. I think I need an XML parser but I'm not entirely sure.  I have a PHP file with the following code...

 

<param name="movie" value="photoviewer.swf?intGalleryID=<?php echo $_GET['GalleryID']; ?>&intPhotoID=<?php echo $_GET['PhotoID']; ?>">

    <param name="quality" value="high"><param name="BGCOLOR" value="#000000">

    <embed src="photoviewer.swf?intGalleryID=<?php echo $_GET['GalleryID']; ?>&intPhotoID=<?php echo $_GET['PhotoID']; ?>" width="560" height="560" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" bgcolor="#000000"></embed>

 

The file passes arguments to "photoviewer.swf" which includes the following reference...

 

ruXML.load(_root.strXMLURL + "/xml/gallery.xml?GalleryID=" + intGalleryID);

 

to "gallery.xml".  Gallery XML contains a tree structure as follows...

 

<?xml version="1.0" encoding="UTF-8"?>

<galleries>

<gallery ID="12345" gname="Name">

</gallery>

<gallery ID="22345" gname="Name">

</gallery>

</galleries>

 

Now, while the browser shows it's loading the correct XML Gallery ID it actually loads the entire XML file  and only reads the first id before hitting the first </gallery> and aborting.  In essence, while the browser states it's reading the correct ID it's certainly not displaying it. It only displays whichever gallery is first.  Do I need a parser?  Is there some code I can place in my PHP to possibly make this work?

 

Any help is greatly appreciated. Thank You.

"Clumps"

Link to comment
https://forums.phpfreaks.com/topic/51615-php-xml-recognition/
Share on other sites

Your Flash file is responsible for parsing the XML file, and you are already using an XML parser with this line:

 

ruXML.load(_root.strXMLURL + "/xml/gallery.xml?GalleryID=" + intGalleryID);

 

Your PHP file is only responsible for generating the correct Flash file URL in the HTML code, which is definitely working if you see the variables being displayed at the top of your browser..

 

Like I mentioned in your other thread about this, you need to add some debugging code to your Flash file to verify that that the Flash file is receiving the intGalleryID variable correctly.. If it is, then you would probably want to find the documentation for the ruXML class that the Flash file uses to try and figure out why it isn't doing what you expect..

 

If you don't know what to do in the Flash code, then you might have better luck getting more help in a Flash forum, since most users on this forum are coding in PHP without Flash..

 

Link to comment
https://forums.phpfreaks.com/topic/51615-php-xml-recognition/#findComment-254276
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.