Skip to content

Instantly share code, notes, and snippets.

@nicholasohrn
Created October 23, 2015 16:26
Show Gist options
  • Save nicholasohrn/42d5cdb28925033baeaa to your computer and use it in GitHub Desktop.
Save nicholasohrn/42d5cdb28925033baeaa to your computer and use it in GitHub Desktop.
<?php
$dirname = dirname(__FILE__);
$decoded = $dirname . '/' . 'decoded';
$files = glob("{$dirname}/*.cache");
foreach($files as $file) {
$decoded_filename = base64_decode(str_replace('.cache', '', basename($file))) . '.php';
$decoded_filecont = base64_decode(file_get_contents($file));
file_put_contents("{$decoded}/{$decoded_filename}", $decoded_filecont);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment