2016-08-09 22:28:50 +02:00
|
|
|
#!/usr/bin/env php
|
2016-06-23 23:51:08 +02:00
|
|
|
<?php
|
2016-07-14 15:15:50 +02:00
|
|
|
|
2016-08-07 23:23:10 +02:00
|
|
|
require_once 'vendor/autoload.php';
|
2016-09-12 22:28:27 +02:00
|
|
|
|
Added APIFactory for calling namespaced mtproto methods, cleaned up testing.php and API.php, moved authorization keys, session_id, seq_no and time delta to the Connection class, added close_and_reopen method to the Connection class, improved DataCenter class, renamed Logging class to Logger, added a bit more logging, added setup_logger, switch_dc, init_authorization methods to the MTProto class, added parameter to disable automatic switching to nearest DC in write_client_info, added a try catch block in the create_auth_key method, fixed switching of DCs in wait_for_response method, added arguments check in the method calling methods, added a message id check in MessageHandler, added method_name_namespaced array in TL for APIFactory, renamed a lot of stuff and removed a few checks in the TL class, moved sendCode test call to testing.php
2016-11-16 15:05:27 +01:00
|
|
|
$MadelineProto = new \danog\MadelineProto\API();
|
|
|
|
|
|
|
|
if (file_exists('number.php')) {
|
|
|
|
include_once 'number.php';
|
|
|
|
$sendCode = $MadelineProto->auth->sendCode(
|
|
|
|
[
|
|
|
|
'phone_number' => $number,
|
|
|
|
'sms_type' => 5,
|
|
|
|
'api_id' => $this->settings['app_info']['api_id'],
|
|
|
|
'api_hash' => $this->settings['app_info']['api_hash'],
|
|
|
|
'lang_code' => $this->settings['app_info']['lang_code'],
|
|
|
|
]
|
|
|
|
);
|
|
|
|
var_dump($sendCode);
|
|
|
|
}
|