{"id":26486606,"url":"https://github.com/aliterm/phptgbot","last_synced_at":"2026-05-14T20:04:52.069Z","repository":{"id":56945766,"uuid":"81745662","full_name":"aliterm/phptgbot","owner":"aliterm","description":"PHP Telegram Bot","archived":false,"fork":false,"pushed_at":"2017-05-01T09:21:08.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-09T16:23:38.922Z","etag":null,"topics":["php","telegram","telegram-bot"],"latest_commit_sha":null,"homepage":null,"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/aliterm.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":"2017-02-12T18:04:38.000Z","updated_at":"2017-02-12T18:08:53.000Z","dependencies_parsed_at":"2022-08-21T07:20:28.925Z","dependency_job_id":null,"html_url":"https://github.com/aliterm/phptgbot","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/aliterm/phptgbot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aliterm%2Fphptgbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aliterm%2Fphptgbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aliterm%2Fphptgbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aliterm%2Fphptgbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aliterm","download_url":"https://codeload.github.com/aliterm/phptgbot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aliterm%2Fphptgbot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33041229,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-14T02:00:06.663Z","response_time":57,"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":["php","telegram","telegram-bot"],"created_at":"2025-03-20T06:20:04.883Z","updated_at":"2026-05-14T20:04:52.035Z","avatar_url":"https://github.com/aliterm.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHP Telegram Bot\n\nPHP Telegram Bot\n\n## Installation\n\n### Using [Composer](https://getcomposer.org)\n\n`composer.json` :\n\n```json\n{\n    \"require\": {\n        \"alisoftware/phptgbot\": \"*\"\n    }\n}\n```\n\n`index.php`:\n\n```php\n\u003c?php\n   require __DIR__ .'/vendor/autoload.php' ;\n   use \\Alisoftware\\Phptgbot as Bot;\n   \n   Bot::setToken(''); \n   Bot::getMe();\n```\n\n## Longpooling / Webhook\n\nExample:\n\n```php\n\u003c?php\n   require __DIR__ .'/vendor/autoload.php' ;\n   use \\Alisoftware\\Phptgbot as Bot;\n   \n   Bot::setToken(''); \n   \n   // webhook\n   // Bot::setToken('TOKEN',true); \n   \n   Bot::run(function($response){\n      if ($response['error'] == false) \n      {\n        $message = isset($response['message'])?$response['message']:false;\n        $onChannel = isset($response['channel_post'])?$response['channel_post']:false;\n        if ($message != false) onMessage($message);\n        //if ($onChannel != false) onMessage($onChannel);\n      }   \n   });\n   \n   function onMessage($message){\n     print_r($message);\n     if ($message['text'] == 'ping') {\n            Bot::send('message','\u003cb\u003ePONG!\u003c/b\u003e');\n        }\n   }\n```\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faliterm%2Fphptgbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faliterm%2Fphptgbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faliterm%2Fphptgbot/lists"}