iosoft Posted February 3, 2008 Share Posted February 3, 2008 Hi 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'. http://www.photoleech.com/api.php I am able to LOGIN, GET_ALBUM_LIST and GET_IMAGE_LIST, but unable to UPLOAD images :'( Procedure says - Requires: * 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 - $tempfile='/home/ayan/public_html/test.jpg'; $handle = fopen($tempfile,'rb'); $file_content = fread($handle,filesize($tempfile)); fclose($handle); $encoded = base64_encode($file_content); $process['sessionkey']='8b285f12771286e5cf0c139358e7fbf9'; // arbitary $process['title']='test.jpg'; // Trying both // $process['data']=$encoded; $process['data']='data:image/jpeg;base64,'.$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. What does it mean ? What title ? Please help, stacked for a month Quote Link to comment https://forums.phpfreaks.com/topic/89190-sos-photoleech-integration/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.