@@ -17,9 +17,6 @@ Installation and usage is pretty straight forward:
17
17
18
18
### Require this package with [ Composer] ( https://getcomposer.org/ )
19
19
20
- - For PHP <7 we need version 0.1.*
21
- - For PHP 7+ we need version 0.2.*
22
-
23
20
Either run this command in your command line:
24
21
25
22
```
@@ -155,34 +152,36 @@ Enable admins? Add custom command paths? Set up logging?
155
152
156
153
Here is a list of available extra parameters:
157
154
158
- Parameter | Description
159
- --------- |------------
160
- webhook | URL to the manager PHP file used for setting up the Webhook.
161
- | * e.g.* ` 'https://example.com/manager.php' `
162
- certificate | Path to a self-signed certificate (if necessary).
163
- | * e.g.* ` __DIR__ . '/server.crt' `
164
- max_connections | Maximum allowed simultaneous HTTPS connections to the webhook
165
- | * e.g.* ` 20 `
166
- allowed_updates | List the types of updates you want your bot to receive
167
- | * e.g.* ` ['message', 'edited_channel_post', 'callback_query'] `
168
- logging | Path(s) where to the log files should be put. This is an array that can contain all 3 log file paths (` error ` , ` debug ` and ` update ` ).
169
- | * e.g.* ` ['error' => __DIR__ . '/php-telegram-bot-error.log'] `
170
- admins | An array of user ids that have admin access to your bot.
171
- | * e.g.* ` [12345] `
172
- mysql | Mysql credentials to connect a database (necessary for [ ` getUpdates ` ] ( #using-getupdates-method ) method!).
173
- | * e.g.* ` ['host' => '127.0.0.1', 'user' => 'root', 'password' => 'root', 'database' => 'telegram_bot'] `
174
- download_path | Custom download path.
175
- | * e.g.* ` __DIR__ . '/Download' `
176
- upload_path | Custom upload path.
177
- | * e.g.* ` __DIR__ . '/Upload' `
178
- commands_paths | A list of custom commands paths.
179
- | * e.g.* ` [__DIR__ . '/CustomCommands'] `
180
- command_configs | A list of all custom command configs.
181
- | * e.g.* ` ['sendtochannel' => ['your_channel' => '@my_channel'] `
182
- botan_token | The Botan.io token to be used for analytics.
183
- | * e.g.* ` 'botan_12345' `
184
- custom_input | Override the custom input of your bot (mostly for testing purposes!).
185
- | * e.g.* ` '{"some":"raw", "json":"update"}' `
155
+ Parameter | Description
156
+ --------- |------------
157
+ validate_request | Only allow webhook access from valid Telegram API IPs.
158
+ * bool* | * default is ` true ` *
159
+ webhook | URL to the manager PHP file used for setting up the Webhook.
160
+ * string* | * e.g.* ` 'https://example.com/manager.php' `
161
+ certificate | Path to a self-signed certificate (if necessary).
162
+ * string* | * e.g.* ` __DIR__ . '/server.crt' `
163
+ max_connections | Maximum allowed simultaneous HTTPS connections to the webhook
164
+ * int* | * e.g.* ` 20 `
165
+ allowed_updates | List the types of updates you want your bot to receive
166
+ * array* | * e.g.* ` ['message', 'edited_channel_post', 'callback_query'] `
167
+ logging | Path(s) where to the log files should be put. This is an array that can contain all 3 log file paths (` error ` , ` debug ` and ` update ` ).
168
+ * array* | * e.g.* ` ['error' => __DIR__ . '/php-telegram-bot-error.log'] `
169
+ admins | An array of user ids that have admin access to your bot.
170
+ * array* | * e.g.* ` [12345] `
171
+ mysql | Mysql credentials to connect a database (necessary for [ ` getUpdates ` ] ( #using-getupdates-method ) method!).
172
+ * array* | * e.g.* ` ['host' => '127.0.0.1', 'user' => 'root', 'password' => 'root', 'database' => 'telegram_bot'] `
173
+ download_path | Custom download path.
174
+ * string* | * e.g.* ` __DIR__ . '/Download' `
175
+ upload_path | Custom upload path.
176
+ * string* | * e.g.* ` __DIR__ . '/Upload' `
177
+ commands_paths | A list of custom commands paths.
178
+ * array* | * e.g.* ` [__DIR__ . '/CustomCommands'] `
179
+ command_configs | A list of all custom command configs.
180
+ * array* | * e.g.* ` ['sendtochannel' => ['your_channel' => '@my_channel'] `
181
+ botan_token | The Botan.io token to be used for analytics.
182
+ * string* | * e.g.* ` 'botan_12345' `
183
+ custom_input | Override the custom input of your bot (mostly for testing purposes!).
184
+ * string* | * e.g.* ` '{"some":"raw", "json":"update"}' `
186
185
187
186
### Using getUpdates method
188
187
0 commit comments