imageAdd
public static Boolean imageAdd(string token, ImageData imgdata)
Add the Image.Returns true if the image is embeded else false.
| Parameters |
| string token | A valid token for your account. To generate a token, use the login method. |
| ImageData imgdata | The array containing the image details.
| string image_name | The name of the image. | | string image_url | The URL for the image. | | string image_data | The binary data of the image. | | string image_height | The height of the image. | | string image_width | The width of the image. | | string image_size | The size of the image. |
|
| Returns |
| Boolean | Returns true if the image is added else false. |
- <?php
- /**
- This Example shows how to authenticate a user using XML-RPC.
- Note that we are using the PEAR XML-RPC client and recommend others do as well.
- **/
- require_once 'XML/RPC2/Client.php';
- require_once 'inc/config.php';
- $client = XML_RPC2_Client::create($apiURL);
- $token = $client->login($apiLogin, $apiPassword);
-
- $imgData['image_name'] = '160x600.jpg';
- $imgData['image_data'] = bytedata of image;
- $returnValue = $client->imageAdd($token, $imgData);
- ?>