{"id":22017695,"url":"https://github.com/myinnos/telegram-bot-php","last_synced_at":"2026-05-17T19:34:24.449Z","repository":{"id":80788265,"uuid":"262734523","full_name":"myinnos/Telegram-Bot-PHP","owner":"myinnos","description":"Telegram Bot for sending message or photo to telegram channel or group using PHP","archived":false,"fork":false,"pushed_at":"2020-05-11T06:37:39.000Z","size":6,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-27T10:48:26.818Z","etag":null,"topics":["php","telegram","telegram-bot","telegram-bot-api","telegram-bots"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/myinnos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-10T07:28:33.000Z","updated_at":"2025-03-20T13:43:23.000Z","dependencies_parsed_at":"2023-03-10T13:30:42.319Z","dependency_job_id":null,"html_url":"https://github.com/myinnos/Telegram-Bot-PHP","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/myinnos/Telegram-Bot-PHP","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myinnos%2FTelegram-Bot-PHP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myinnos%2FTelegram-Bot-PHP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myinnos%2FTelegram-Bot-PHP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myinnos%2FTelegram-Bot-PHP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/myinnos","download_url":"https://codeload.github.com/myinnos/Telegram-Bot-PHP/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myinnos%2FTelegram-Bot-PHP/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33151807,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T09:28:26.183Z","status":"ssl_error","status_checked_at":"2026-05-17T09:27:52.702Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","telegram-bot-api","telegram-bots"],"created_at":"2024-11-30T05:07:32.596Z","updated_at":"2026-05-17T19:34:24.441Z","avatar_url":"https://github.com/myinnos.png","language":"PHP","funding_links":["https://www.paypal.me/fansfolio"],"categories":[],"sub_categories":[],"readme":"# Telegram Bot PHP\nTelegram is a popular instant messaging service that prides itself on security. It has all of the features you would expect from a modern chat platform, including chatbots: software-based agents that you can program to read and respond to other users’ messages.\n\n**Setup Your Bot’s Telegram Profile** \n\nTo set up a new bot profile, log in to your Telegram account and start a conversation with the BotFather _**(@BotFather)**_, an official account that allows you to create and manage bots. In that conversation, enter the _**/newbot**_ command.\n\nThe BotFather will ask you to choose a display name and username for your bot. The username has to end in “bot” and must be unique. In our example, we’ve settled on the display name SampleName and username _**SampleNameBot**_.\n\nOnce you’ve landed on a valid username, the BotFather will automatically register your bot and reply with a _**token**_ for the Telegram API, unique to that bot. Make sure not to share your token with anyone.     \n\n**Note:** Add a bot to channel or group and make bot as Admin\n\n      \nHow to use\n-----\n**Sending Message:** send a message to group or channel:\n```php\n\n  $botToken = \u003ctoken\u003e;\n  $chat_id = \u003cgroup or channel name\u003e;\n  $message = \u003cmessage\u003e;\n  $bot_url    = \"https://api.telegram.org/bot$botToken/\";\n\n  $url = $bot_url.\"sendMessage?chat_id=\".$chat_id.\"\u0026text=\".urlencode($message);\n  file_get_contents($url);\n  \n```\n**Sending Photo:** send an photo with caption to group or channel:\n```php\n\n  $botToken = \u003ctoken\u003e;\n  $chat_id = \u003cgroup or channel name\u003e;\n  $message = \u003cmessage\u003e;\n  $bot_url    = \"https://api.telegram.org/bot$botToken/\";\n\n  $post_fields = array('chat_id'   =\u003e $chat_id,\n      'caption' =\u003e \u003ccaption_text\u003e,\n      'photo'   =\u003e \u003cphoto_url\u003e\n  );\n\n  $ch = curl_init(); \n  curl_setopt($ch, CURLOPT_HTTPHEADER, array(\n      \"Content-Type:multipart/form-data\"\n  ));\n  curl_setopt($ch, CURLOPT_URL, $url); \n  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); \n  curl_setopt($ch, CURLOPT_POSTFIELDS, $post_fields); \n  $output = curl_exec($ch);\n  \n```\n##### Any Queries? or Feedback, please let me know by opening a [new issue](https://github.com/myinnos/Telegram-Bot-PHP/issues/new)!\n\n## Contact\n#### Prabhakar Thota\n* :globe_with_meridians: Website: [myinnos.in](http://www.myinnos.in \"Prabhakar Thota\")\n* :email: e-mail: contact@myinnos.in\n* :mag_right: LinkedIn: [PrabhakarThota](https://www.linkedin.com/in/prabhakarthota \"Prabhakar Thota on LinkedIn\")\n* :thumbsup: Twitter: [@myinnos](https://twitter.com/myinnos \"Prabhakar Thota on twitter\")    \n* :camera: Instagram: [@prabhakar_t_](https://www.instagram.com/prabhakar_t_/ \"Prabhakar Thota on Instagram\")   \n\n\u003e If you appreciate my work, consider buying me a cup of :coffee: to keep me recharged :metal: by [PayPal](https://www.paypal.me/fansfolio)\n\nLicense\n-------\n\n    Copyright 2020 MyInnos\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmyinnos%2Ftelegram-bot-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmyinnos%2Ftelegram-bot-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmyinnos%2Ftelegram-bot-php/lists"}