Textlocal Logo

API Documentation

PHP Class Overview

The PHP class makes using the Textlocal API easier by providing a class which takes the web requests out of the question.

Note: PHP Class examples are available throughout the API Documentation by selecting PHP as your chosen language and viewing the Class tab in the sample request.

Requirements

The PHP class requires PHP 5.2 or higher with the PHP cURL module installed.

Installation Instructions

  1. Download the latest version of the PHP Class.
  2. Unzip/Unpack it into a directory that is in your PHP's include_path. If unsure, check your php.ini file.
  3. Include or require the class in your script.

Constructor

__construct($username, $hash)

username The email address used to log into Textlocal.
hash Your secure hash can be found within Messenger in the main navigation under "Help->All Documentation".
Alternatively you can use the password parameter instead and use your Textlocal password in plain text.
apiKey This can be used instead of the username/hash/password. You can create them in your Messenger Control Panel (click here) for each application, and limit the usage of them by host IP Address.

Class Reference