Another bugfix
This commit is contained in:
parent
e13d28ecda
commit
95a9a0a07c
@ -1,9 +0,0 @@
|
||||
<?php
|
||||
|
||||
require 'vendor/autoload.php';
|
||||
$secret = 'pony';
|
||||
$secret = md5('pony');
|
||||
echo "Secret is $secret\n";
|
||||
|
||||
$handler = new \danog\MadelineProto\Server(['type' => AF_INET, 'protocol' => 0, 'address' => '0.0.0.0', 'port' => 7777, 'handler' => '\danog\MadelineProto\Server\Proxy', 'extra' => ['madeline' => new \danog\MadelineProto\API('proxy.madeline', ['app_info' => ['api_id' => 6, 'api_hash' => 'eb06d4abfb49dc3eeb1aeb98ae0f581e']]), 'secret' => hex2bin($secret), 'timeout' => 30]]);
|
||||
$handler->start();
|
@ -26,6 +26,15 @@ class Server
|
||||
{
|
||||
set_error_handler(['\\danog\\MadelineProto\\Exception', 'ExceptionErrorHandler']);
|
||||
\danog\MadelineProto\Logger::constructor(3);
|
||||
|
||||
if (!extension_loaded('sockets')) {
|
||||
throw new Exception(['extension', 'sockets']);
|
||||
}
|
||||
|
||||
if (!extension_loaded('pcntl')) {
|
||||
throw new Exception(['extension', 'pcntl']);
|
||||
}
|
||||
|
||||
$this->settings = $settings;
|
||||
$this->mypid = getmypid();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user