问题
I am using Piwik and after inspecting the database i see a table: piwik_archive_blob__
This table has a column called value with type: mediumblob
The values appear to be jumbled characters. I assume that there is an encode/decode process.
Can anyone help me decode this column. I think there is good data here, but i need to be able to read it
Thanks
回答1:
The value
column stores serialized and gzcompressed DataTable objects, so there is no easy way to read it.
回答2:
Just a quick example how you could uncompress and deserialize it using PHP:
- Download the blob as a .bin using something a tool like phpmyadmin
- Load the file into PHP, uncompress and unserialze it using the following:
<?php
$sBlobFile = file_get_contents( 'piwik_archive_blob_2017_03-value.bin' );
$sBlobFile = unserialize( gzuncompress ( $sBlobFile ) );
var_dump( $sBlobFile );
Of course you can also just retrieve the blob using MySQL and access it directly in PHP opposed to downloading it as a file first.
来源:https://stackoverflow.com/questions/27622759/piwik-database-piwik-archive-blob-value-column