SOS: PhotoLeech integration


This is my 1st post here, so, very very sorry if I make any mistake.

I need a help in PhotoLeech integration and Base64 Encoding of Image file.

PhotoLeech (free image hosting service) provides, PHP XM-RPC based site integration method so that images/albums hosted on that server can be incorporate with users site… combine as ‘one’.

I am able to LOGIN, GET_ALBUM_LIST and GET_IMAGE_LIST, but unable to UPLOAD images :’(

Procedure says -

* sessionkey (string, 32)
* title (string, 32)
* data (string)

The image data must be the base64 encoded title. Unlike photoleech.sendFile, the sessionkey is not invalidated.

I am doing this -

$handle = fopen($tempfile,'rb');
$file_content = fread($handle,filesize($tempfile));
$encoded = base64_encode($file_content);

$process['sessionkey']='8b285f12771286e5cf0c139358e7fbf9'; // arbitary

// Trying both
// $process['data']=$encoded;

$client->query('Server.saveData', $process);

Output is ??? -

Array ( [faultCode] => 5 [faultString] => decoded data does not match title )

I think, the problem is here -

The image data must be the base64 encoded title.

[b]What does it mean ? What title ?

Please help, stacked for a month :([/b]

Sponsor our Newsletter | Privacy Policy | Terms of Service