Accessing Xibo API using PHP.

Asked by Janne Jusula

Hi,

I'm quite new to oauth and API-programming, but I did manage to get authentication right and succesfully use some of the functions in example_oauth. But I'm having trouble with the function 'LayoutRegionMediaEdit()'.

While I'm able to change other attributes, I'm unable to change the content of the region xlf. Xibo error log shows this:

----------------------
<errormsg>DOMDocument::loadXML(): Start tag expected, '&lt;' not found in Entity, line: 1</errormsg>
<errornum>2</errornum>
<errortype>Warning</errortype>
<scriptname>/var/www/demo2/lib/modules/module.class.php</scriptname>
<scriptlinenum>1754</scriptlinenum>
----------------------

I'm trying to use same format that is in the example:

----------------------
'xlf' => '<?xml version="1.0"?>
<media id="b2036df53ae2bdcbb5322a183709afbc" type="webpage" duration="50" schemaVersion="1" userId="1"> <options><uri>https%3A%2F%2Fwww.gust.edu.kw%2F</uri><scaling>100</scaling><transparency>0</transparency><offsetLeft>0</offsetLeft><offsetTop>0</offsetTop></options>
        <raw/>
</media>'
----------------------

I've tried to change the '<' and '>' to '&lt;' and '&gt;' respectively, but to no avail.

So, what am I missing here?

PHP is version 5.4.23-1+sury.org~precise+1

Question information

Language:
English Edit question
Status:
Answered
For:
Xibo Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Alex Harrington (alexharrington) said :
#1

Best bet is to look at the test suite code:
https://code.launchpad.net/~alexharrington/xibo/api-testsuite

Can you help with this problem?

Provide an answer of your own, or ask Janne Jusula for more information if necessary.

To post a message you must log in.