PHPackages                             aspose/html-sdk-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [PDF &amp; Document Generation](/categories/documents)
4. /
5. aspose/html-sdk-php

ActiveLibrary[PDF &amp; Document Generation](/categories/documents)

aspose/html-sdk-php
===================

This repository contains Aspose\_Html\_Cloud\_SDK for PHP source code. Aspose Cloud SDK for PHP lets PHP developers convert and process a variety of file formats in the cloud quickly and easily.

25.12.1(5mo ago)031MITPHPPHP &gt;=7.4

Since Aug 5Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/aspose-html-cloud/aspose-html-cloud-php)[ Packagist](https://packagist.org/packages/aspose/html-sdk-php)[ Docs](https://github.com/aspose-html-cloud/aspose-html-cloud-php)[ RSS](/packages/aspose-html-sdk-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (5)Versions (10)Used By (0)

Aspose HTML Cloud SDK
=====================

[](#aspose-html-cloud-sdk)

This repository contains Aspose.HTML Cloud SDK source code. This SDK allows you to work with Aspose.HTML Cloud REST APIs in your applications quickly and easily.

See [API Reference](https://apireference.aspose.cloud/html/) for full API specification.

How to use the SDK?
-------------------

[](#how-to-use-the-sdk)

The complete source code is available in this repository folder, you can either directly use it in your project.

Requirements
------------

[](#requirements)

PHP 5.6 and later

### Prerequisites

[](#prerequisites)

To use Aspose HTML for Cloud SDK you need to register an account with [Aspose Cloud](https://www.aspose.cloud/) and lookup/create App Key and SID at [Cloud Dashboard](https://dashboard.aspose.cloud/#/apps). There is free quota available. For more details, see [Aspose Cloud Pricing](https://purchase.aspose.cloud/pricing).

Installation &amp; Usage
------------------------

[](#installation--usage)

### Composer

[](#composer)

To install the bindings via [Composer](http://getcomposer.org/), add the following to `composer.json`:

```
{
  "repositories": [
    {
      "type": "git",
      "url": "https://github.com/aspose-html-cloud/aspose-html-cloud-php.git"
    }
  ],
  "require": {
    "aspose/aspose-html-cloud-php": "dev-master"
  }
}

```

Then run `composer install`

### Manual Installation

[](#manual-installation)

Download the files and include `autoload.php`:

```
    require_once('/path/to/aspose-html-cloud-php/vendor/autoload.php');
```

Getting Started
---------------

[](#getting-started)

Example:
Pass configuration to constructor (see in tests - BaseTest.php)

```
        $conf = array(
            "basePath" => "https://api.aspose.cloud/v4.0",
            "authPath" => "https://api.aspose.cloud/connect/token",
            "apiKey" => "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "appSID" => "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
            "testResult" => "\\testresult\\",
            "testData" => "\\testdata\\",
            "remoteFolder" => "HtmlTestDoc",
            "defaultUserAgent" => "Webkit",
            "debugFile" => "php://output",
            "debug" => false
        );

            self::$api_html = new HtmlApi($configuration);
            self::$api_stor = new StorageApi($configuration);

// optional for test
            self::$testFolder = realpath(__DIR__ . '/../..') . $configuration['testData'];
            self::$testResult = realpath(__DIR__ . '/../..') . $configuration['testResult'];
```

\###Note: do not forget to add in php.ini

```
...
extension=php_openssl.dll
...
upload_max_filesize = 200M ; or 0 - unlimited
...
max_execution_time = 0 ; unlimited
...
default_socket_timeout = 3600 ; for long time operations

```

Tests
-----

[](#tests)

To run the unit tests:

```
composer install
./vendor/bin/phpunit

```

Please follow the [installation procedure](#installation--usage) and then run the following:

```
