Link Search Menu Expand Document

Creating a client

This page explains how to create a MadelineProto instance.

To create the session and set the serialization destination file, do the following:

$MadelineProto = new \danog\MadelineProto\API('session.madeline', $settings); // The session will be serialized to session.madeline

Do the same to load a serialized session:

$MadelineProto = new \danog\MadelineProto\API('session.madeline', $settings);  // The session will be loaded from session.madeline

MadelineProto can also be configured to run on ephemeral filesystems (i.e. docker containers with no volumes, storing all data on MySQL/Postgres/Redis) by setting a table prefix manually in the settings, as specified here ».

Next section