• Gear
  • Shots
  • Photo Craft
  • Video
  • Wide Angle
  • Support
  • New Stuff
  • More
Support SmugMug APIs, Hacks & Tricks Outputting from getalbum...

FAQtoid

Ever wanted to create an Avatar? Creating an Avatar!

Searching Dgrin with Google Searching with Google

Dgrin Challenges

Congratulations to the Winner of DSS #128 (Sunrise or Sunset), ShootingStar.

The next Dgrin Challenge DSS #129 (Silhouette Revisited ) is open for entries through May 27th, 2013 at 8:00pm PDT.

As always, we look forward to your participation but please do take a moment to read through the rules before posting your entry.

Past DSS Challenge Winners, DSS Challenge Rules, and other important DSS Challenge information is here.

Need some help with Accessories?

Tutorials

Ever find yourself wondering just how someone managed to create an image using different effects?

Here are three simple tutorials we hope will encourage you to try something new.

The Hot Seat

A lifelong interest in landscape photography has led Eyal Oren to make a study of his adopted hometown of Marblehead, MA. As you can see, his dedication is paying off!

Africa!

Dgrinners Harryb, Pathfinder, and others joined Andy Williams and Marc Muench on Safari in East Africa recently. Here are some awesome threads to check out!

 
Thread Tools Display Modes
Old May-11-2005, 03:35 AM
#1
elyobelyob is offline elyobelyob OP
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.
Old May-11-2005, 05:19 AM
#2
devbobo is offline devbobo
technicolored
devbobo's Avatar
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
__________________
David Parry
SmugMug API Developer
My Photos
Old May-11-2005, 05:48 AM
#3
elyobelyob is offline elyobelyob OP
Big grins
Quote:
Originally Posted by devbobo
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.

print $albums_array['AlbumID'];
print $albums_array['Title'];
It's the populating of the array within the function. i.e. after the xml_decode I am not getting any data into my fields. The print commands were empty.

Thanks
Tell The World!  

Thread Tools
Display Modes

Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump