public static Boolean imageAdd(string token, ImageData imgdata)
Add the Image.Returns true if the image is embeded else false.
Image Gallery Related Methods

string tokenA valid token for your account. To generate a token, use the login method.
ImageData imgdataThe array containing the image details.
string image_nameThe name of the image.
string image_urlThe URL for the image.
string image_dataThe binary data of the image.
string image_heightThe height of the image.
string image_widthThe width of the image.
string image_sizeThe size of the image.

BooleanReturns true if the image is added else false.

download example code

  1. <?php
  2. /**
  3. This Example shows how to authenticate a user using XML-RPC.
  4. Note that we are using the PEAR XML-RPC client and recommend others do as well.
  5. **/
  6. require_once 'XML/RPC2/Client.php';
  7. require_once 'inc/config.php';
  8. $client = XML_RPC2_Client::create($apiURL);
  9. $token = $client->login($apiLogin, $apiPassword);
  11. $imgData['image_name'] = '160x600.jpg';
  12. $imgData['image_data'] = bytedata of image;
  13. $returnValue = $client->imageAdd($token, $imgData);
  14. ?>