PHP xml Generator

  • Hi, I have a problem with krpano.swf when I try to load a xml url with more than one argument.
    Here is my code :

    Code
    <script type="text/javascript">
    	embedpano({swf:"/krpano/krpano.swf", xml:"xmlgenerator.php?player=vrtv&id=paranoid", target:"panoVRTV"});
    </script>


    As you can see, I don't call a xml file but a php wich generate xml code according to the parameters player and id. But here is my problem, when krpano is loaded, the second argument is simply ignored. The first argument is transmited but not the second. And if I write xmlgenerator.php?id=paranoid&player=vrtv it's the same problem, id is transmited but not player. Of course, I tested the url xmlgenerator.php?player=vrtv&id=paranoid in my browser and here there is no problem, the php script generates a valide xml code.

    Please help me ! Is there a trick to insert in the php url ? Or is it a limitation of krpano.swf who is not able to call a url with more than one parameter ?

  • Hi,

    yes, this is krpano limitation - internally all viewer variables were passed as one string to the viewer, and these variables itself were also separated by the & character. That means with each & in the url a new krpano variable/parameter starts.

    That means for this case you would need to use an other separator character than & and then split the parameters manually in php.

    Best regards,
    Klaus

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!