Skip to content

GTA San Andreas Multiplayer PHP client for work with remote console

Notifications You must be signed in to change notification settings

EvilFreelancer/samp-api-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SAMP API PHP client

Simple PHP client for San Andreas Multiplayer server for executing commands on remote console.

composer require evilfreelancer/samp-api-php

How to use

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

$config = new \SampApi\Config([
    'server'   => 'localhost',
    'port'     => '7777',
    'password' => '12345',
]);
$client = new \SampApi\Rcon($config);

// Get list of vars (only this method is ready for right now)
$response = $client->getVarlist();
dump($response);

// Another way
$response = $client->send('varlist');
dump($response);

// Yet another way, OOP style
$client->responseModel = true;
$response = $client->getVarlist();
dump($response);

List of all available commands can be found here.

Links

Documentation and some important links

Alternatives

About

GTA San Andreas Multiplayer PHP client for work with remote console

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages