Just change the $infile and $outfile variables, and run the script, and it'll spit out a base64 encoded PHP file ready for distribution.
<?php
$infile = '';
$outfile = '';
$h1 = fopen($infile, 'r');
$h2 = fopen($outfile, 'w');
$tmp = fread($h1, filesize($infile));
$tmp = preg_replace("/<?[ph]*/i", "", $tmp);
$tmp = preg_replace("/?>/i", "", $tmp);
$contents = "<? eval(base64_decode('";
$contents .= base64_encode($tmp);
$contents .= "')); ?>";
fwrite($h2, $contents);
fclose($h1);
fclose($h2);
echo("Done");
?>



