PHP code example of aurimasniekis / ffi-tdlib
1. Go to this page and download the library: Download aurimasniekis/ffi-tdlib library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
aurimasniekis / ffi-tdlib example snippets
namespace AurimasNiekis\FFI;
class TdLib
{
/**
* @param string|null $libFile An optional file path/name to `libtdjson.so` library
*/
public function __construct(string $libFile = null)
{
}
/**
* Synchronously executes TDLib request.
* Only a few requests can be executed synchronously.
*
* @param array|\JsonSerializable $request
*
* @return array
*/
public static function execute($request): array
{
}
/**
* Receives incoming updates and request responses from the TDLib client.
*
* @param float $timeout The maximum number of seconds allowed for this function to wait for new data.
*
* @return array
*/
public function receive(float $timeout): array
{
}
/**
* Sends request to the TDLib client.
*
* @param array|\JsonSerializable $request
*/
public function send($request): void
{
}
}