PHPackages                             multitheftauto/mtasa-php-sdk - 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. [API Development](/categories/api)
4. /
5. multitheftauto/mtasa-php-sdk

ActiveLibrary[API Development](/categories/api)

multitheftauto/mtasa-php-sdk
============================

MTA SDK to interact with MTA's server.

v1.2.0(3y ago)211.2k↓75%7[2 PRs](https://github.com/multitheftauto/mtasa-php-sdk/pulls)MITPHPPHP ^7.4 || ^8.0

Since Sep 5Pushed 2y ago3 watchersCompare

[ Source](https://github.com/multitheftauto/mtasa-php-sdk)[ Packagist](https://packagist.org/packages/multitheftauto/mtasa-php-sdk)[ Docs](https://multitheftauto.com/)[ RSS](/packages/multitheftauto-mtasa-php-sdk/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (9)Dependencies (12)Versions (12)Used By (0)

MTA:SA PHP SDK
==============

[](#mtasa-php-sdk)

[![PHP Composer](https://github.com/multitheftauto/mtasa-php-sdk/workflows/PHP%20Composer/badge.svg?branch=master)](https://github.com/multitheftauto/mtasa-php-sdk/workflows/PHP%20Composer/badge.svg?branch=master)

You can access the MTA Web Interface from almost any programming language that can request web pages. PHP can do this very easily.

This SDK provides one function call that will allow you to call any exported script functions on any server that you have access to.

See the [official wiki page](https://wiki.multitheftauto.com/wiki/PHP_SDK) for further information.

Installation
------------

[](#installation)

### Prerequisites

[](#prerequisites)

This SDK requires PHP 7.4 or greater.

### HTTPlug client abstraction

[](#httplug-client-abstraction)

As this SDK uses HTTPlug, you will have to require some libraries for get it working. See ["HTTPlug for library users"](http://docs.php-http.org/en/latest/httplug/users.html) for more info.

**Quick installation (Fixed from HTTPlug documentation)**

```
composer require php-http/curl-client guzzlehttp/psr7 php-http/message http-interop/http-factory-guzzle

```

⚠️ **Note**: If you don't follow this requirement before require the SDK, composer will throw you an error.

### Setup

[](#setup)

The only supported installation method is via [Composer](https://getcomposer.org). Run the following command to require this SDK in your project:

```
composer require multitheftauto/mtasa-php-sdk

```

A simple example
----------------

[](#a-simple-example)

There are three ways to call an MTA server's exported functions, as shown in the following example:

```
