3 function sac_clean($string) {
5 $string = str_replace(
"\n",
"", $string);
6 $string = str_replace(
"\r",
"", $string);
7 $string = str_replace(
"\t",
"", $string);
9 $string = preg_replace(
'/\t/',
'', $string);
10 $string = preg_replace(
'/\s\s+/',
' ', $string);
11 $string = trim($string);
15 function base64chunk($in, $out) {
19 $fh_in = fopen($in,
'rb');
20 $fh_out = fopen($out,
'ab');
28 $row = fgets($fh_in, 4096);
42 $b64 = base64_encode($row);
45 if (strlen($b64) < 76) {
52 } elseif (strlen($b64) > 76) {
54 $put .= substr($b64, 0, 76) .
"\r\n";
55 $b64 = substr($b64, 76);
56 }
while (strlen($b64) > 76);
58 $cache = base64_decode($b64);
60 if (!$eof && $b64{75} ==
'=') {