debugging

This commit is contained in:
Daniil Gentili 2017-02-02 11:45:00 +01:00
parent a1f464b46a
commit bda80a98b0

View File

@ -493,11 +493,13 @@ trait UpdateHandler
public function pwr_webhook($update)
{
$payload = json_encode($this->utf8ize($update));
\danog\MadelineProto\Logger::log([$update, $payload, json_last_error()]);
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_URL, $this->hook_url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($this->utf8ize($update)));
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$parse = parse_url($this->hook_url);
if (isset($parse['scheme']) && $parse['scheme'] == 'https') {