'.$nameorig); // Remove all the split files shell_exec('rm '.$nameorig.'.split*'); // show checksum sha512 of the merged file $out = shell_exec('sha512sum '.$nameorig); echo $out; } } } else { // If it is not upload, show upload script file: upload.sh as text/plain header('Content-Type: text/plain'); $data = file_get_contents('upload.sh'); // replace %%UPLOADHOST%% in $data with the current hostname of webserver $data = str_replace('%%UPLOADHOST%%', $_SERVER['HTTP_HOST'], $data); echo $data; } } else { // http error header('HTTP/1.0 403 Forbidden'); echo 'Forbidden'; }