Y
Y
yischyk2020-05-06 00:40:13
PHP
yischyk, 2020-05-06 00:40:13

Is there any way to get a picture?

5eb1dd356320b945849907.pngIs it possible to get a picture out of this? maybe there are people who understand this?

array(16) { ["_"]=> string(7) "message" ["out"]=> bool(false) ["mentioned"]=> bool(false) ["media_unread"]=> bool(false) ["silent"]=> bool(false) ["post"]=> bool(true) ["from_scheduled"]=> bool(false) ["legacy"]=> bool(false) ["edit_hide"]=> bool(false) ["id"]=> int(578) ["to_id"]=> array(2) { ["_"]=> string(11) "peerChannel" ["channel_id"]=> int(1343293966) } ["date"]=> int(1588521756) ["message"]=> string(259) "⚡В Украине за 10 дней разработали собственный аппарат ИВЛ. Стоимость одного экземпляра до $720, что в гораздо ниже любых аналогов. @Ukraine" ["media"]=> array(2) { ["_"]=> string(17) "messageMediaPhoto" ["photo"]=> array(8) { ["_"]=> string(5) "photo" ["has_stickers"]=> bool(false) ["id"]=> int(5294041114015280658) ["access_hash"]=> int(2430245086627285892) ["file_reference"]=> object(danog\MadelineProto\TL\Types\Bytes)#497 (1) { ["bytes":"danog\MadelineProto\TL\Types\Bytes":private]=> string(29) "P B^Z,ŬCn" } ["date"]=> int(1588521756) ["sizes"]=> array(4) { [0]=> array(3) { ["_"]=> string(17) "photoStrippedSize" ["type"]=> string(1) "i" ["bytes"]=> object(danog\MadelineProto\TL\Types\Bytes)#500 (1) { ["bytes":"danog\MadelineProto\TL\Types\Bytes":private]=> string(250) "'($?Me854BcKYH'=YI؊[Xf]QzS᷏n{nH#v,TdLXDlTgjvbE9EX.BQm.̋UVXYy!#ҝj{G} "<}~; array(6) { ["_"]=> string(9) "photoSize" ["type"]=> string(1) "m" ["location"]=> array(3) { ["_"]=> string(26) "fileLocationToBeDeprecated" ["volume_id"]=> int(264420366) ["local_id"]=> int(428432) } ["w"]=> int(320) ["h"]=> int(308) ["size"]=> int(23118) } [2]=> array(6) { ["_"]=> string(9) "photoSize" ["type"]=> string(1) "x" ["location"]=> array(3) { ["_"]=> string(26) "fileLocationToBeDeprecated" ["volume_id"]=> int(264420366) ["local_id"]=> int(428433) } ["w"]=> int(800) ["h"]=> int(770) ["size"]=> int(79267) } [3]=> array(6) { ["_"]=> string(9) "photoSize" ["type"]=> string(1) "y" ["location"]=> array(3) { ["_"]=> string(26) "fileLocationToBeDeprecated" ["volume_id"]=> int(264420366) ["local_id"]=> int(428430) } ["w"]=> int(1080) ["h"]=> int(1040) ["size"]=> int(62896) } } ["dc_id"]=> int(2) } } ["entities"]=> array(1) { [0]=> array(3) { ["_"]=> string(20) "messageEntityMention" ["offset"]=> int(144) ["length"]=> int(8) } } ["views"]=> int(146) }

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
PQR, 2020-05-06
@PQR

I haven't worked directly with MTProto from PHP, but judging by the type description of the private property, bytes "danog\MadelineProto\TL\Types\Bytes"is a collection of bytes. You can try to save it to a file and view it with any program that opens the image:file_put_contents($bytes);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question