Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $files = array('kenzi.vhd.aa', 'kenzi.vhd.ab', 'kenzi.vhd.ac', 'kenzi.vhd.ad', 'kenzi.vhd.ae', 'kenzi.vhd.af', 'kenzi.vhd.ag', 'kenzi.vhd.ah', 'kenzi.vhd.ai', 'kenzi.vhd.aj', 'kenzi.vhd.ak', 'kenzi.vhd.al', 'kenzi.vhd.am', 'kenzi.vhd.an', 'kenzi.vhd.ao', 'kenzi.vhd.ap', 'kenzi.vhd.aq', 'kenzi.vhd.ar', 'kenzi.vhd.as', 'kenzi.vhd.at', 'kenzi.vhd.au', 'kenzi.vhd.av', 'kenzi.vhd.aw', 'kenzi.vhd.ax', 'kenzi.vhd.ay', 'kenzi.vhd.az', 'kenzi.vhd.ba', 'kenzi.vhd.bb', 'kenzi.vhd.bc', 'kenzi.vhd.bd', 'kenzi.vhd.be', 'kenzi.vhd.bf', 'kenzi.vhd.bg', 'kenzi.vhd.bh', 'kenzi.vhd.bi', 'kenzi.vhd.bj', 'kenzi.vhd.bk', 'kenzi.vhd.bl', 'kenzi.vhd.bm', 'kenzi.vhd.bn', 'kenzi.vhd.bo', 'kenzi.vhd.bp', 'kenzi.vhd.bq');
- $out = "/home/zefie/Desktop/tmp/kenzi.vhd";
- $written = 0;
- $outp = fopen($out,"w");
- foreach ($files as $file) {
- $fp = fopen($file,'r');
- while (!feof($fp)) {
- $data = fread($fp,4096);
- fwrite($outp,$data);
- $written = ($written+strlen($data));
- echo("File: ".$file." ~ Total Written: ".file_size($written)." \r");
- }
- fclose($fp);
- }
- fclose($outp);
- function file_size($size)
- {
- $filesizename = array(" Bytes", " KB", " MB", " GB", " TB", " PB", " EB", " ZB", " YB");
- return $size ? round($size/pow(1024, ($i = floor(log($size, 1024)))), 2) . $filesizename[$i] : '0 Bytes';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement