All Products
Search
Document Center

Content Moderation:Installation

Last Updated:Jul 31, 2023

Before you use Content Moderation SDK for PHP, you must install the required dependencies.

Prerequisites

PHP 5.5 or later is used.

Install the SDK

  1. Download Content Moderation SDK for PHP.

  2. Run the following command to install Content Moderation SDK for PHP:

    composer require alibabacloud/green
  3. Run the following command to install the required dependencies:

    use AlibabaCloud\Green\Green;

Configure environment variables

In Alibaba Cloud SDK code, you can create a default access credential by defining ALIBABA_CLOUD_ACCESS_KEY_ID and ALIBABA_CLOUD_ACCESS_KEY_SECRET environment variables. When you call API operations of Alibaba Cloud services, the system directly accesses the credential, reads your AccessKey pair, and then automatically completes authentication. Before you use the SDK sample code, you must configure environment variables. For more information, see Configure credentials.