1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-30 07:38:58 +01:00
MadelineProto/testing.php

18 lines
573 B
PHP
Raw Normal View History

2016-06-23 23:51:08 +02:00
<?php
2016-07-14 15:15:50 +02:00
set_include_path(get_include_path().PATH_SEPARATOR.dirname(__FILE__).DIRECTORY_SEPARATOR.'libpy2php');
require_once 'libpy2php.php';
require_once 'os.php';
require_once 'mtproto.php';
2016-06-26 14:53:16 +02:00
$config = parse_ini_file('credentials', true);
if (!$config) {
2016-06-23 23:51:08 +02:00
pyjslib_printnl('File \'credentials\' seems to not exist.');
$exit(-1);
}
2016-06-26 14:53:16 +02:00
$ip = $config['App data']['ip_address'];
$port = $config['App data']['port'];
$Session = new Session($ip, $port);
$Session->create_auth_key();
$future_salts = $Session->method_call('get_future_salts', 3);
2016-06-23 23:51:08 +02:00
pyjslib_printnl($future_salts);