{"id":49626943,"url":"https://github.com/thisismzm/tdlib-php-ffi","last_synced_at":"2026-05-05T08:05:20.013Z","repository":{"id":62550601,"uuid":"500086059","full_name":"thisismzm/tdlib-php-ffi","owner":"thisismzm","description":"An implementation of Telegram's TDLib in PHP using FFI extension","archived":false,"fork":false,"pushed_at":"2026-02-06T10:40:00.000Z","size":5,"stargazers_count":22,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-13T15:07:04.061Z","etag":null,"topics":["tdlib","tdlib-php","telegram-client","telegram-php","telegram-php-client","telegram-tdlib"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thisismzm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-06-05T12:04:22.000Z","updated_at":"2026-03-12T22:22:49.000Z","dependencies_parsed_at":"2022-11-03T01:46:06.261Z","dependency_job_id":null,"html_url":"https://github.com/thisismzm/tdlib-php-ffi","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/thisismzm/tdlib-php-ffi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thisismzm%2Ftdlib-php-ffi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thisismzm%2Ftdlib-php-ffi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thisismzm%2Ftdlib-php-ffi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thisismzm%2Ftdlib-php-ffi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thisismzm","download_url":"https://codeload.github.com/thisismzm/tdlib-php-ffi/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thisismzm%2Ftdlib-php-ffi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32640541,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-04T10:08:07.713Z","status":"online","status_checked_at":"2026-05-05T02:00:06.033Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["tdlib","tdlib-php","telegram-client","telegram-php","telegram-php-client","telegram-tdlib"],"created_at":"2026-05-05T08:05:18.777Z","updated_at":"2026-05-05T08:05:20.007Z","avatar_url":"https://github.com/thisismzm.png","language":"PHP","funding_links":[],"categories":["Bindings"],"sub_categories":["PHP"],"readme":"# TDLib PHP FFI\nAn implementation of Telegram's TDLib in PHP by FFI extension\n\n## Docs\n\n### Create an instance\n```php\n/**\n* @param string|null $tdlibFilePath A file path/name to `libtdjson.so` library\n*/\npublic function __construct(string $tdlibFilePath)\n```\n\n### Create client id\nReturns an opaque identifier of a new TDLib instance.\nThe TDLib instance will not send updates until the first request is sent to it.\n```php\n/**\n * @return int an opaque identifier of a new TDLib instance\n */\npublic function createClientId(): int\n```\n\n### Send request\nSends request to the TDLib client.\nMay be called from any thread.\n```php\n/**\n * @param int $clientId TDLib client id\n * @param string $request $request JSON-serialized request to TDLib.\n * \n * @return void\n */\npublic function send(int $clientId, string $request): void\n```\n\n### Receive response and updates\nReceives incoming updates and request responses.\nMust not be called simultaneously from two different threads.\n```php\n/**\n * @param int $timeout The maximum number of seconds allowed for this function to wait for new data\n * \n * @return string|null incoming update or request response or may be null if the timeout expires.\n */\npublic function receive(int $timeout): ?string\n```\n\n### Synchronously executes a request\nSynchronously executes a TDLib request.\nA request can be executed synchronously, only if it is documented with \"Can be called synchronously\".\n```php\n/**\n* @param string $request JSON-serialized request to TDLib.\n* \n* @return string|null JSON-serialized null-terminated request response.\n*/\npublic function execute(string $request): ?string\n```\n\n## 💜 Support this project\n\nIf this project saves you time or money, consider supporting its development.\n\n**Crypto donations:**\n- Toncoin (TON): `UQCI2hg2r7TV9xFS-4H6uRlySPRkYUlEVQm-BDhlPAAaVpfb`\n\nThank you for supporting open-source ❤️\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthisismzm%2Ftdlib-php-ffi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthisismzm%2Ftdlib-php-ffi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthisismzm%2Ftdlib-php-ffi/lists"}