recebe.php
Essa é uma revisão anterior do documento!
Script “recebe.php”, que recebe dados enviados via http.
<?
# recebe arquivo if (!empty($_POST['nome'])) { $fh = fopen($_POST['nome'],"w"); $dados = base64_decode($_POST['conteudo']); fwrite($fh,$dados); $cmd = "md5sum " . $_POST['nome'] . " | awk '{print $1}'"; $md5 = system($cmd); print $_POST['nome'] . " : $md5"; } # junta pedacos se necessario if (!empty($_POST['juntar'])) { $cmd = "cat " . $_POST['juntar'] . ".* > " . $_POST['juntar']; $execucao = system($cmd); $cmd = "rm -f " . $_POST['juntar'] . ".*"; $execucao = system($cmd); $cmd = "md5sum " . $_POST['juntar'] . " | awk '{print $1}'"; $md5 = system($cmd); print $_POST['juntar'] . " : $md5"; }
?>
recebe.php.1224073776.txt.gz · Última modificação: 2008/10/15 12:29 por cartola