API Documentation
  • Introduction
  • Resources
    • Languages
    • Image Reports
    • Projects
  • API Librairies
    • PHP
Powered by GitBook
On this page
  • Requirements
  • Installation
  • Getting Started
  • Resources
  • Image Reports

Was this helpful?

  1. API Librairies

PHP

https://github.com/ImageSEO/imageseo-php

PreviousProjects

Last updated 6 years ago

Was this helpful?

Requirements

  • PHP version 5.6 and later

  • ImageSEO API Key, starting at

Installation

You can install the library via . Run the following command:

composer require imageseo/imageseo-php

To use the library, use Composer's :

require_once __DIR__. '/vendor/autoload.php';

Getting Started

Authentication

<?php

use ImageSeo\Client\Client;

$apiKey = "YOUR_API_KEY";
$client =new Client($apiKey);

Resources

Image Reports

Example : Generate an image report from URL

<?php

use ImageSeo\Client\Client;

$apiKey = "YOUR_API_KEY";
$client =new Client($apiKey);

$data = [
    "url": "https://example.com/image.jpg"
];
$report = $client->getResource('ImageReports')->generateReportFromUrl($data);

Example : Generate an image report from file

<?php

use ImageSeo\Client\Client;

$apiKey = "YOUR_API_KEY";
$client =new Client($apiKey);

$data = [
    "filePath": "/path/your/image.jpg"
];
$report = $client->getResource('ImageReports')->generateReportFromFile($data);

Our SDK operates on the principle of resources. You must choose the resource on which you want to make an API call in order to use different methods.

free level
Composer
autoload
See the list of our resources