|
|
Thread Tools | Display Modes |
|
#1
|
|
|
Big grins
|
Outputting from getalbum...
I'm writing a first script using php & xmlrpc and have hit a brick wall. I've got the sessionid working and also the getalbums script working. However, I am trying to print out the results from getalbum and after three full days, I'm begging for some help.
My debug definitely shows data is coming out. However I have not managed to return the data correctly from the function .. if (!$get_albums_response->faultCode()) { $albums_array = xmlrpc_decode($get_albums_value); $albums = array($albums_array['AlbumID'],$albums_array['Title']); return $albums; } Example of data in debug ... ---EVALING---[1210 chars]--- new xmlrpcval(array(new xmlrpcval(array('AlbumID' => new xmlrpcval(123456, 'int'),'Title' => new xmlrpcval("title"),'CategoryID' => new xmlrpcval(0, 'int'),'Category' => new xmlrpcval("Other")), 'struct'),new xmlrpcval(array('AlbumID' => new xmlrpcval(123456, 'int'),'Title' => new xmlrpcval("title2"),'CategoryID' => new xmlrpcval(20567, 'int'),'Category' => new xmlrpcval("NJB")), 'struct'),new xmlrpcval(array('AlbumID' => new xmlrpcval(123456, 'int'),'Title' => new xmlrpcval("Title3"),'CategoryID' => new xmlrpcval(0, 'int'),'Category' => new xmlrpcval("Other")), 'struct'),new xmlrpcval(array('AlbumID' => new xmlrpcval(123456, 'int'),'Title' => new xmlrpcval("title4"),'CategoryID' => new xmlrpcval(123456, 'int'),'Category' => new xmlrpcval("Title5")), 'struct'),new xmlrpcval(array('AlbumID' => new xmlrpcval(123456, 'int'),'Title' => new xmlrpcval("Title6"),'CategoryID' => new xmlrpcval(123456, 'int'),'Category' => new xmlrpcval("Title7")), 'struct'),new xmlrpcval(array('AlbumID' => new xmlrpcval(123456, 'int'),'Title' => new xmlrpcval("Title8"),'CategoryID' => new xmlrpcval(123456, 'int'),'Category' => new xmlrpcval("Title9")), 'struct')), 'array'); ---END--- Any help sorely appreciated. |
|
|
|
|
#2
|
|
|
technicolored
|
Nick,
If u use the code below, do it print out the right values ? Trying to work out if it is accessing the info correctly or whether it's the way ur returning from the function. if (!$get_albums_response->faultCode()) { $albums_array = xmlrpc_decode($get_albums_value); $albums = array($albums_array['AlbumID'],$albums_array['Title']); print $albums_array['AlbumID']; print $albums_array['Title']; return $albums; } Cheers, David |
|
|
|
|
#3
|
||
|
Big grins
|
Quote:
Thanks |
|
|
|
||
| Tell The World! | |
| Thread Tools | |
| Display Modes | |
|
|