<?php require_once 'WMSigner.php'; $wmid = '123456789012'; $key = array('pass' => 'zzzzzzzzzz', 'file' => 'C:\\path\\to\\285045456218.kwm '); $wms = new WMSigner($wmid, $key); print_r($wms->ExportKeys());
<?php include '_header.php'; $wmsigner = new WMSigner(WMID, $wmkey); $keys = $wmsigner->ExportKeys(); $keys['base64'] = base64_encode(file_get_contents(KWMFILE)); foreach ($keys as $k => $v) { $path = KWMFILE . '.' . $k; if (file_put_contents($path, $v)) { echo "{$k} saved to: {$path}\n"; } } echo "Done.\n";