Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
TelegramBot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
TelegramBot
Commits
d756b2d0
Commit
d756b2d0
authored
Jul 06, 2015
by
LONGMAN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes
parent
80ce3980
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
49 deletions
+50
-49
README.md
README.md
+10
-10
composer.json
composer.json
+40
-39
No files found.
README.md
View file @
d756b2d0
...
...
@@ -4,10 +4,10 @@
[
![Join the chat at https://gitter.im/akalongman/php-telegram-bot
](
https://badges.gitter.im/Join%20Chat.svg
)
](https://gitter.im/akalongman/php-telegram-bot?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[
![Build Status
](
https://travis-ci.org/akalongman/php-telegram-bot.svg?branch=master
)
](https://travis-ci.org/akalongman/kautilities)
[
![Latest Stable Version
](
https://img.shields.io/packagist/v/Longman/telegram-bot.svg
)
](https://packagist.org/packages/longman/
php-
telegram-bot)
[
![Total Downloads
](
https://img.shields.io/packagist/dt/Longman/telegram-bot.svg
)
](https://packagist.org/packages/longman/
php-
telegram-bot)
[
![Downloads Month
](
https://img.shields.io/packagist/dm/Longman/telegram-bot.svg
)
](https://packagist.org/packages/longman/
php-
telegram-bot)
[
![License
](
https://img.shields.io/packagist/l/Longman/telegram-bot.svg
)
](https://packagist.org/packages/
stichoza/longman/php-
telegram-bot)
[
![Latest Stable Version
](
https://img.shields.io/packagist/v/Longman/telegram-bot.svg
)
](https://packagist.org/packages/longman/telegram-bot)
[
![Total Downloads
](
https://img.shields.io/packagist/dt/Longman/telegram-bot.svg
)
](https://packagist.org/packages/longman/telegram-bot)
[
![Downloads Month
](
https://img.shields.io/packagist/dm/Longman/telegram-bot.svg
)
](https://packagist.org/packages/longman/telegram-bot)
[
![License
](
https://img.shields.io/packagist/l/Longman/telegram-bot.svg
)
](https://packagist.org/packages/
longman/
telegram-bot)
A Telegram Bot based on the official
[
Telegram Bot API
](
https://core.telegram.org/bots/api
)
...
...
@@ -76,7 +76,7 @@ Create composer.json file:
"
name
"
:
"
yourproject/yourproject
"
,
"
type
"
:
"
project
"
,
"
require
"
:
{
"
php
"
:
"
>=5.
3
.0
"
,
"
php
"
:
"
>=5.
4
.0
"
,
"
longman/telegram-bot
"
:
"
*
"
}
}
...
...
@@ -100,14 +100,14 @@ Create set.php and put:
```
php
<?php
$loader
=
require
\_\_DIR\_\
_
.
'/vendor/autoload.php'
;
$loader
=
require
__DIR_
_
.
'/vendor/autoload.php'
;
$API
\_KEY
=
'your\_bot\_api\
_key'
;
$API
_KEY
=
'your_bot_api
_key'
;
$BOT_NAME
=
'namebot'
;
try
{
// create Telegram API object
$telegram
=
new
Longman\TelegramBot\Telegram
(
$API
\_KEY
,
$BOT
\
_NAME
);
$telegram
=
new
Longman\TelegramBot\Telegram
(
$API
_KEY
,
$BOT
_NAME
);
// set webhook
echo
$telegram
->
setWebHook
(
'https://yourdomain/yourpath_to_hook.php'
);
...
...
@@ -123,9 +123,9 @@ After create hook.php and put:
```
php
<?php
$loader
=
require
\_\_DIR\_\
_
.
'/vendor/autoload.php'
;
$loader
=
require
__DIR_
_
.
'/vendor/autoload.php'
;
$API
\_KEY
=
'your\_bot\_api\
_key'
;
$API
_KEY
=
'your_bot_api
_key'
;
$BOT_NAME
=
'namebot'
;
try
{
...
...
composer.json
View file @
d756b2d0
...
...
@@ -20,6 +20,7 @@
"require"
:
{
"php"
:
">=5.4.0"
,
"ext-pdo"
:
"*"
,
"ext-curl"
:
"*"
,
"
hoa/math
"
:
"
~0.0
"
},
"autoload"
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment