About how php decrypts.. net encrypted database content and files used by the company's original website. net, now let me use php revision, now need to export the original database, found that the export is a binary data, they are known to use HttpPostedFile. inputStream stores the entire file and content as a binary stream, which is also the read byte (I didn't understand it). What should I do? Please advise
Reply to discussion (solution)
What kind of data? At least a graph should be captured
The converted things are too long, so no
This is a piece of data I picked (the Forum character limit, only a small part)
...
0x0000d0000c0c0 ......
This indicates a hexadecimal string.
You can use the pack function to restore the original content after removing the preceding 0x.
$ S = pack ('H * ', substr ($ s, 2 ));
Your example is a BMP image data.
I have tried this before, but I used C at the time. now I am using H or C with the same garbled code problem. I can't solve it all the time. the online information is about encoding, I tried all the major codes, but I still don't know what to do.
Thank you for not solving the problem.
Although you only paste the data segment, you can still see a BMP image when your data is uploaded.
$s = '424D465C0C0000000000360000002800000058020000C20100000100180000000000105C0C00000000000000000000000000000000004132AB4132AB4132AB4132AB4132AB4132AB4132AB4132AB4132AB4334AD4334AD4132AB3E2FA83D2EA73F30A93E31B13D32C43B31CB3D33CD3E34CE3F34D03E33CF3E33D03D32CF3D32CF3D32CF3D31D13D31D13D30D23D30D23D30D23D31D13F30D13F32CE3F32CA3F33C94031C84031C8412FC84131C54431C34232BB4133B13F32AC4132AC4231B04530B54331BA3F31B83C33B93D33BB3F35BD4134C04134C04033BF4033BF4334BE4234BC4333BC4234B84032B63F31B44132B24030B33D2DB64131BE4434C74337CD4035D23D32D43E33D74034DA4231D84231D84';$s = pack('H*', $s);$FILE = unpack ( "vfile_type/Vfile_size/Vreserved/Vbitmap_offset" , substr($s, 0, 14 ));print_r($FILE);$BMP = unpack ( 'Vheader_size/Vwidth/Vheight/vplanes/vbits_per_pixel' . '/Vcompression/Vsize_bitmap/Vhoriz_resolution' . '/Vvert_resolution/Vcolors_used/Vcolors_important' , substr( $s, 14, 40 )); print_r($BMP);
Array( [file_type] => 19778 [file_size] => 810054 [reserved] => 0 [bitmap_offset] => 54)Array( [header_size] => 40 [width] => 600 [height] => 450 [planes] => 1 [bits_per_pixel] => 24 [compression] => 0 [size_bitmap] => 810000 [horiz_resolution] => 0 [vert_resolution] => 0 [colors_used] => 0 [colors_important] => 0)