andyhu / mht2html
MHT to HTML converter
Installs: 112
Dependents: 0
Suggesters: 0
Security: 0
Stars: 23
Watchers: 3
Forks: 10
pkg:composer/andyhu/mht2html
Requires
- php: >=5.2.0
This package is not auto-updated.
Last update: 2024-04-08 11:22:40 UTC
README
A fast memory effecient PHP class to convert MHT file to HTML (and images)
Usage:
require('MthToHtml.php');
$mth = new MhtToHtml('./mthfile.mht', './output' /* output directory, default to './html' */);
// optional, save images using images' md5 as name, around 2 times slower but can make sure there's no duplicate images saved
// $mth->setReplaceImageName(true);
$time = microtime(true);
$mth->parse();
$time = microtime(true) - $time;
echo 'Time Used: ', $time, PHP_EOL, 'Peak Memory:', memory_get_peak_usage();