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
991bfb72
Commit
991bfb72
authored
Nov 26, 2015
by
MBoretto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
example and read me
parent
b45be4bf
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
21 deletions
+2
-21
README.md
README.md
+2
-2
example-unset.php
example-unset.php
+0
-19
No files found.
README.md
View file @
991bfb72
...
...
@@ -329,9 +329,9 @@ $telegram->setDownloadPath("yourpath/Download");
$telegram
->
setUploadPath
(
"yourpath../Upload"
);
```
###Unset Webhook
Edit
*example
-
unset.php*
with your credential and execute it.
Edit
*example
/
unset.php*
with your credential and execute it.
### Logging
Thrown Exception are stored in
TelegramException.log
file (in the base directory).
Thrown Exception are stored in
*TelegramException.log*
file (in the base directory).
Incoming update (json string from webhook and getUpdates) can be logged on a text file, set those options with the methods:
```
php
...
...
example-unset.php
deleted
100644 → 0
View file @
b45be4bf
<?php
//Composer Loader
$loader
=
require
__DIR__
.
'/vendor/autoload.php'
;
$API_KEY
=
'your_bot_api_key'
;
$BOT_NAME
=
'namebot'
;
try
{
// create Telegram API object
$telegram
=
new
Longman\TelegramBot\Telegram
(
$API_KEY
,
$BOT_NAME
);
// set webhook
$result
=
$telegram
->
unsetWebHook
();
//Uncomment to use certificate
//$result = $telegram->setWebHook($link, $path_certificate);
if
(
$result
->
isOk
())
{
echo
$result
->
getDescription
();
}
}
catch
(
Longman\TelegramBot\Exception\TelegramException
$e
)
{
echo
$e
;
}
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