MadelineProtoDocs/template/method-example.md
2020-06-16 17:50:25 +02:00

22 lines
449 B
Markdown

### MadelineProto Example ([now async for huge speed and parallelism!](https://docs.madelineproto.xyz/docs/ASYNC.html)):
```php
if (!file_exists('madeline.php')) {
copy('https://phar.madelineproto.xyz/madeline.php', 'madeline.php');
}
include 'madeline.php';
$MadelineProto = new \danog\MadelineProto\API('session.madeline');
$MadelineProto->start();
$%s = $MadelineProto->%s([%s]);
```
Or, if you're into Lua:
```lua
%1$s = %s({%s})
```