-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGetImageInfo.php
More file actions
35 lines (30 loc) · 1.16 KB
/
Copy pathGetImageInfo.php
File metadata and controls
35 lines (30 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
// ========================================================================
// Author: DynamicPDF.COM CETE www.dynamicpdf.com
// Copyright: (c) 2021 DynamicPDF Cloud API
// License: MIT - for additional information see ./LICENSE in this project.
// Errors: Please report any errors in software to support@dynamicpdf.com
// ========================================================================
require __DIR__ . '/vendor/autoload.php';
include_once("constants.php");
use DynamicPDF\Api\ImageResource;
use DynamicPDF\Api\ImageInfo;
class GetImageInfo
{
public static function Run(string $apikey, string $path)
{
$imageResource = new ImageResource($path . "dynamicpdfLogo.png");
$imageInfo = new ImageInfo($imageResource);
$imageInfo->ApiKey = $apikey;
$response = $imageInfo->Process();
if($response->IsSuccessful)
{
echo ($response->JsonContent);
} else {
echo("Error: ");
echo($response->StatusCode);
echo($response->ErrorMessage);
}
}
}
GetImageInfo::Run(CLIENT_EXAMPLES_API_KEY,CLIENT_EXAMPLES_BASE_PATH . "/get-image-info-image-info-endpoint/");