<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8114129964535350146</id><updated>2024-09-12T05:35:31.478-07:00</updated><category term="links retirados do www.google.com.br"/><title type='text'>Felipe Eleoterio T.I.</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blogdoeleoterio.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8114129964535350146/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://blogdoeleoterio.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Felipe Eleoterio</name><uri>http://www.blogger.com/profile/12908994114810532505</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgM-A2rKYq3VviiWASflHA3E0enEqEy31E9B2LDSJEEy3wugms9595z4wiAQoORnYoY-D35LZmiM_ojmQosbl7p-qWQolFAnQgKLcGHrJDiIWLvcfz3zG7J5K_w0xgFZw/s220/1013631_626368350823468_457855547827338277_n.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>5</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8114129964535350146.post-3949341893481833492</id><published>2015-01-07T13:48:00.001-08:00</published><updated>2015-01-07T13:48:14.571-08:00</updated><title type='text'>Por que Linux é mais seguro que o Windows</title><content type='html'>&quot;Segurança pela obscuridade&quot; pode ser uma frase atrativa, mas não é a única coisa que está pegando entre os usuários do Windows.&lt;br /&gt;
&lt;br /&gt;
A expressão é a intenção de sugerir que o software proprietário é mais seguro em virtude de sua natureza fechada. Se os hackers não podem ver o código, então é mais difícil para eles para criar exploits para ele - ou assim o pensamento vai.&lt;br /&gt;
&lt;br /&gt;
Infelizmente para os usuários do Windows, que não é verdade - como evidenciado pelo desfile interminável de remendos que saem de Redmond. Na verdade, uma das muitas vantagens do Linux sobre o Windows é que ele é mais seguro - muito mais. Para as pequenas empresas e outras organizações sem uma equipe dedicada de especialistas em segurança, esse benefício pode ser particularmente crítica.&lt;br /&gt;
&lt;br /&gt;
Cinco fatores fundamentais subjacentes a segurança superior do Linux:&lt;br /&gt;
&lt;br /&gt;
1. Privilégios&lt;br /&gt;
&lt;br /&gt;
Sistemas Linux não são de forma infalível, mas uma de suas principais vantagens está na forma como privilégios de conta são atribuídos. No Windows, os usuários são geralmente dada acesso de administrador, por padrão, o que significa que praticamente tem acesso a tudo no sistema, até mesmo suas partes mais cruciais. Assim, então, os vírus. É como dar terroristas posições governamentais de alto nível.&lt;br /&gt;
&lt;br /&gt;
Com o Linux, por outro lado, os usuários não costumam ter esses privilégios &quot;root&quot;; em vez disso, eles estão normalmente dada contas de nível inferior. O que isso significa é que, mesmo que um sistema Linux está comprometido, o vírus não terá o acesso root seria necessário para causar danos em todo o sistema; mais provável, arquivos e programas locais apenas do usuário seriam afetados. Isso pode fazer a diferença entre um aborrecimento menor e uma grande catástrofe em qualquer ambiente de negócios.&lt;br /&gt;
&lt;br /&gt;
2. Engenharia social&lt;br /&gt;
&lt;br /&gt;
Vírus e worms frequentemente transmitida por usuários de computador convencer a fazer algo que não deveria, como abrir anexos que carregam vírus e worms. Isso é chamado de engenharia social, e é muito fácil em sistemas Windows. Basta enviar um e-mail com um anexo malicioso e uma linha de assunto como &quot;Confira essas adoráveis filhotes!&quot; - Ou o equivalente pornô - e alguns proporção de usuários é obrigado a clicar sem pensar. O resultado? Uma porta aberta para o malware anexado, com consequências potencialmente desastrosas organizationwide.&lt;br /&gt;
&lt;br /&gt;
Graças ao fato de que a maioria dos usuários de Linux não tem acesso root, no entanto, é muito mais difícil de realizar qualquer dano real em um sistema Linux, levando-os a fazer algo estúpido. Antes de qualquer dano real poderia ocorrer, um usuário Linux teria que ler o e-mail, salvar o anexo, dar-lhe permissões executáveis e, em seguida, executar o arquivo executável. Não é muito provável que, em outras palavras.&lt;br /&gt;
&lt;br /&gt;
3. O Efeito Monocultura&lt;br /&gt;
&lt;br /&gt;
No entanto, você quer discutir os números exatos, não há dúvida de que o Microsoft Windows ainda domina a maior parte do mundo da computação. No reino de e-mail, assim também fazer o Outlook e Outlook Express. E aí reside um problema: É essencialmente uma monocultura, o que há melhor em tecnologia é que ela está no mundo natural. Assim como a diversidade genética é uma coisa boa no mundo natural, pois minimiza os efeitos deletérios de um vírus mortal, de modo a diversidade de ambientes de computação ajuda a proteger os usuários.&lt;br /&gt;
&lt;br /&gt;
Felizmente, uma diversidade de ambientes é mais um benefício que o Linux oferece. Há Ubuntu, há Debian, Gentoo há, e há muitas outras distribuições. Há também muitos shells, muitos sistemas de empacotamento, e muitos clientes de correio; Linux é executado mesmo em muitas arquiteturas além de apenas Intel. Assim, ao passo que um vírus pode ser direcionada diretamente para usuários do Windows, uma vez que todos eles usam praticamente a mesma tecnologia, chegando a mais de uma pequena facção de usuários do Linux é muito mais difícil. Quem não gostaria de dar a sua empresa que camada extra de segurança?&lt;br /&gt;
&lt;br /&gt;
4. Audiência Tamanho&lt;br /&gt;
&lt;br /&gt;
Mão-na-mão com este efeito de monocultura vem do fato de não particularmente surpreendente que a maioria dos vírus têm como alvo o Windows e os desktops em sua organização não são excepção. Milhões de pessoas todos os que usam o mesmo software tornar um alvo atraente para ataques maliciosos.&lt;br /&gt;
&lt;br /&gt;
5. Quantos Eyeballs&lt;br /&gt;
&lt;br /&gt;
&quot;Linus&quot; Lei &quot;- nomeado para Linus Torvalds, o criador do Linux - afirma que,&quot; dadas olhos suficientes, todos os erros são triviais. &quot;O que isso significa é que, quanto maior o grupo de desenvolvedores e testadores trabalhando em um conjunto de código, o mais provável que todas as falhas serão capturados e corrigidos rapidamente. Isto, em outras palavras, é essencialmente o oposto polar da &quot;segurança pela obscuridade&quot; argumento.&lt;br /&gt;
&lt;br /&gt;
Com o Windows, é um conjunto limitado de desenvolvedores pagos que estão a tentar encontrar problemas no código. Eles aderem a seus próprios definiram calendários, e eles geralmente não contar a ninguém sobre os problemas até que eles já criou uma solução, deixando a porta aberta a ataques até que isso aconteça. Não é um pensamento muito reconfortante para as empresas que dependem dessa tecnologia.&lt;br /&gt;
&lt;br /&gt;
No mundo Linux, por outro lado, inúmeros usuários podem ver o código a qualquer momento, tornando mais provável que alguém vai encontrar uma falha, mais cedo ou mais tarde. Não só isso, mas os usuários podem até mesmo corrigir problemas eles mesmos. Microsoft pode tout sua grande equipe de desenvolvedores pagos, mas é pouco provável que a equipe pode comparar com uma base global de Linux usuários-desenvolvedores ao redor do mundo. Segurança só pode se beneficiar através de todos esses extras &quot;olhos&quot;.&lt;br /&gt;
&lt;br /&gt;
Mais uma vez, nada disso é para dizer que o Linux é impermeável; nenhum sistema operacional é. E há definitivamente passos usuários de Linux deve tomar para tornar seus sistemas mais seguro possível, como habilitar o firewall, minimizando o uso de privilégios de root, e manter o sistema atualizado. Para uma maior tranquilidade também existem programas antivírus disponíveis para Linux, incluindo o ClamAV. Estes são particularmente boas medidas para as pequenas empresas, o que provavelmente têm mais em jogo do que usuários individuais fazer.&lt;br /&gt;
&lt;br /&gt;
É importante notar também que a empresa de segurança Secunia declarou recentemente que os produtos da Apple têm mais vulnerabilidades de segurança do que quaisquer outros - incluindo os da Microsoft.&lt;br /&gt;
&lt;br /&gt;
De qualquer maneira, no entanto, quando se trata de segurança, não há dúvida de que os usuários do Linux tem muito menos para se preocupar.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
traduzido de:&lt;br /&gt;
&amp;nbsp;http://www.pcworld.com/article/202452/why_linux_is_more_secure_than_windows.html&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://blogdoeleoterio.blogspot.com/feeds/3949341893481833492/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://blogdoeleoterio.blogspot.com/2015/01/por-que-linux-e-mais-seguro-que-o.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8114129964535350146/posts/default/3949341893481833492'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8114129964535350146/posts/default/3949341893481833492'/><link rel='alternate' type='text/html' href='http://blogdoeleoterio.blogspot.com/2015/01/por-que-linux-e-mais-seguro-que-o.html' title='Por que Linux é mais seguro que o Windows'/><author><name>Felipe Eleoterio</name><uri>http://www.blogger.com/profile/12908994114810532505</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgM-A2rKYq3VviiWASflHA3E0enEqEy31E9B2LDSJEEy3wugms9595z4wiAQoORnYoY-D35LZmiM_ojmQosbl7p-qWQolFAnQgKLcGHrJDiIWLvcfz3zG7J5K_w0xgFZw/s220/1013631_626368350823468_457855547827338277_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8114129964535350146.post-3392396775988279996</id><published>2011-11-21T10:32:00.001-08:00</published><updated>2011-11-21T10:46:21.594-08:00</updated><title type='text'>Upload FTP</title><content type='html'>Boa tarde,&lt;br /&gt;
desculpe a demora por postar hoje mais estou meio sem ideia ...&lt;br /&gt;
para o post anterior nao ficar meu sem sentido vou por como fazer o upload do arquivo no FTP.&lt;br /&gt;
&lt;br /&gt;
Bom para comesarmos precisamos ter um tela como esta:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzHxUACoKMtDJZwzfdok51zB7FFfBtZuyr1pzzOM_oljRe2qb56vG61WMQgoqDTzOJhEEaCYz1qfathmsvnrdSUAH5-ViltqRo5Bjg6mo_x1YGDRR1RQ-V8wX5eEzzUIXpgA8tKw4NoRVe/s1600/ftp1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;204&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzHxUACoKMtDJZwzfdok51zB7FFfBtZuyr1pzzOM_oljRe2qb56vG61WMQgoqDTzOJhEEaCYz1qfathmsvnrdSUAH5-ViltqRo5Bjg6mo_x1YGDRR1RQ-V8wX5eEzzUIXpgA8tKw4NoRVe/s320/ftp1.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
ela é bem simples...&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
é apenas um formulario com um campo do type=&quot;file&quot;..&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
LAMBRESE de por &amp;gt;&amp;gt;&amp;nbsp;enctype=&quot;multipart/form-data&quot;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;lt;form dir=&quot;form1&quot; name=&quot;form1&quot; action=&quot;ftp.php?mat_codigo=&amp;lt;?php echo $row_Recordset1[&#39;mat_codigo&#39;]; ?&amp;gt;&quot; method=&quot;post&quot; enctype=&quot;multipart/form-data&quot;&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;table width=&quot;143&quot; height=&quot;76&quot; border=&quot;1&quot;&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;tr&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;td height=&quot;31&quot;&amp;gt;Codigo:&amp;lt;/td&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;td&amp;gt;&amp;lt;?php echo $row_Recordset1[&#39;mat_codigo&#39;]; ?&amp;gt;&amp;lt;/td&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;/tr&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;tr&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;td&amp;gt;Arquivo&amp;lt;/td&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;td&amp;gt;&amp;lt;input type=&quot;file&quot; name=&quot;filedata&quot; id=&quot;filedata&quot; /&amp;gt;&amp;lt;/td&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;/tr&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;tr&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;td colspan=&quot;2&quot;&amp;gt;&amp;lt;input type=&quot;submit&quot; value=&quot;Upload&quot; /&amp;gt;&amp;lt;/td&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;/tr&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;/table&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;lt;/form&amp;gt; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Como pode se ver no action do form ela é enviada para a pagina &quot;ftp.php&quot; que nao tem nada visual apenas codigo.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;lt;?php require_once(&#39;../../Connections/local.php&#39;); ?&amp;gt; //Pegando conexao com o banco&quot;caso haja q salvar o nome no banco de dados&quot;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;lt;body bgcolor=&quot;#999999&quot;&amp;gt;&amp;lt;?php&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
if(!empty($_FILES[&#39;filedata&#39;][&#39;name&#39;])){ //Verifica se o campo foi mesmo preenchido&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
$ftp_server = &quot;localhost&quot;; //Servidor&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
$upload_dir = &quot;/ftp/&quot;; // Local onde está a pasta onde ficarão salvos os uploads&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
$upload = &quot;/ftp/&quot;; // Caminho dos uploads&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
$ftp_user = &quot;anonymous&quot;; // Usuário do ftp&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
$ftp_pass = &quot;&quot;; // Senha do usuário do ftp&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
$sourcefile = $_FILES[&#39;filedata&#39;][&#39;tmp_name&#39;]; // Variável que pesquisa os uploads&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
$filename = $_FILES[&#39;filedata&#39;][&#39;name&#39;]; // Variável que pega o nome do arquivo&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
$filetype = $_FILES[&#39;filedata&#39;][&#39;type&#39;]; // variavel que pega o tipo do arquivo&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
$finalfile = $upload_dir.$_FILES[&#39;filedata&#39;][&#39;name&#39;]; //começando a parte de upload em si&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
$ftpconn = ftp_connect($ftp_server); //conectando no servidor&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
$ftpresult = ftp_login($ftpconn,$ftp_user,$ftp_pass); //fazendo o login no FTP&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
$ftp_pasv= ftp_pasv($ftpconn,true); //informando que o FTP é passivo&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
// agora é apenas mensagens de erros e informações&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
if((!$ftpconn) || (!$ftpresult)) { // verifica se a conexão foi realizada com sucesso&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;?&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;SCRIPT LANGUAGE=&quot;JavaScript&quot; TYPE=&quot;text/javascript&quot;&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
alert (&quot;Falha na Conexão&quot;) &amp;nbsp;// se nao for concluida ele aprece um alert informando que deu falha na conexao&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;lt;/SCRIPT&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;?php&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
}&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;else {&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
if ($ftpupload = ftp_put($ftpconn,$finalfile,$sourcefile,FTP_BINARY)) { // verifica se o arquivo foi enviado.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;?&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;SCRIPT LANGUAGE=&quot;JavaScript&quot; TYPE=&quot;text/javascript&quot;&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
alert (&quot;Arquivo enviado com Sucesso&quot;) // se for ele manda a mensagem de sucesso&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;lt;/SCRIPT&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;lt;?php&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
}&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;else {&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;?&amp;gt;&amp;lt;SCRIPT LANGUAGE=&quot;JavaScript&quot; TYPE=&quot;text/javascript&quot;&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
alert (&quot;Erro no envio do arquivo!&quot;) // se nao ele mando a mensagem de erro&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;lt;/SCRIPT&amp;gt;&amp;lt;?php&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
}&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
//agora é apenas se tiver banco de dados para salvar o nome&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;if (!empty($_GET[&#39;mat_codigo&#39;])){// verifica se ele recebeu o codigo&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;$str=&quot;update material set mat_url=&#39;&quot;.$filename.&quot;&#39; where mat_codigo=&quot;.$_GET[&#39;mat_codigo&#39;].&quot;&quot;; // sq1 para salvar&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mysql_query($str); // executando a sql.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
include(&quot;list_material.php&quot;); dando um inlcud na listagem...pode ser tbm um redirect...&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
?&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
CODIGO comentado logo acima...&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
qualquer duvida só comentar responderei o mais rapido possivel..&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
ate o proximo,&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
felipe eleoterio&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://blogdoeleoterio.blogspot.com/feeds/3392396775988279996/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://blogdoeleoterio.blogspot.com/2011/11/boa-tarde-desculpe-demora-por-postar.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8114129964535350146/posts/default/3392396775988279996'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8114129964535350146/posts/default/3392396775988279996'/><link rel='alternate' type='text/html' href='http://blogdoeleoterio.blogspot.com/2011/11/boa-tarde-desculpe-demora-por-postar.html' title='Upload FTP'/><author><name>Felipe Eleoterio</name><uri>http://www.blogger.com/profile/12908994114810532505</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgM-A2rKYq3VviiWASflHA3E0enEqEy31E9B2LDSJEEy3wugms9595z4wiAQoORnYoY-D35LZmiM_ojmQosbl7p-qWQolFAnQgKLcGHrJDiIWLvcfz3zG7J5K_w0xgFZw/s220/1013631_626368350823468_457855547827338277_n.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzHxUACoKMtDJZwzfdok51zB7FFfBtZuyr1pzzOM_oljRe2qb56vG61WMQgoqDTzOJhEEaCYz1qfathmsvnrdSUAH5-ViltqRo5Bjg6mo_x1YGDRR1RQ-V8wX5eEzzUIXpgA8tKw4NoRVe/s72-c/ftp1.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8114129964535350146.post-3995601808170882117</id><published>2011-11-20T05:06:00.001-08:00</published><updated>2011-11-20T05:22:09.594-08:00</updated><title type='text'>Download de arquivos do FTP</title><content type='html'>Bom dia,&lt;br /&gt;
Hoje irei explicar como fazer o download de arquivo que esta no FTP.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; Para iniciar fiz uma listagem de todos os arquivos cadastrados em meu banco de dados,&amp;nbsp;já&amp;nbsp;com o link para o&amp;nbsp;download&amp;nbsp; como na imagem a baixo:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidZJ9I2lwGX0Y_FQHY_oiEW6SWOT9ilfg4P59eh5TLXu_m-g5Z-9sXh62TFFUQrowZcdH3eo7gY375k35mKcxTDs3w9HFa8GqegZzEwDQT_tX8nU2Z4y2juhbXlU-iGKHpNqJRZrMt2SEx/s1600/links.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;223&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidZJ9I2lwGX0Y_FQHY_oiEW6SWOT9ilfg4P59eh5TLXu_m-g5Z-9sXh62TFFUQrowZcdH3eo7gY375k35mKcxTDs3w9HFa8GqegZzEwDQT_tX8nU2Z4y2juhbXlU-iGKHpNqJRZrMt2SEx/s320/links.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
Como estou fazendo uma consulta no banco de dados a resultado vai vir de um record set ficando assim a tabela:&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;lt;table border=&quot;0&quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;tr align=&quot;center&quot; bgcolor=&quot;#999999&quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;td&amp;gt;&amp;amp;Aacute;rea&amp;lt;/td&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;td&amp;gt;Tipo Materila&amp;lt;/td&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;td&amp;gt;Titulo&amp;lt;/td&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;td&amp;gt;Link&amp;lt;/td&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;td&amp;gt;Op&amp;amp;ccedil;&amp;amp;otilde;es&amp;lt;/td&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/tr&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;?php do { ?&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;tr&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;td&amp;gt;&amp;lt;?php echo $row_Recordset1[&#39;are_descricao&#39;]; ?&amp;gt;&amp;lt;/td&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;td&amp;gt;&amp;lt;?php echo $row_Recordset1[&#39;tipmat_descricao&#39;]; ?&amp;gt;&amp;lt;/td&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;td&amp;gt;&amp;lt;?php echo $row_Recordset1[&#39;mat_titulo&#39;]; ?&amp;gt;&amp;lt;/td&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;b&gt;&lt;u&gt; &amp;lt;td&amp;gt;&amp;lt;a href=&quot;../../baixar.php?file=&amp;lt;?php echo &amp;nbsp; &amp;nbsp; $row_Recordset1[&#39;mat_url&#39;]; ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $row_Recordset1[&#39;mat_url&#39;]; ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;td&amp;gt;&amp;lt;a href=&quot;ftp_material.php?mat_codigo=&amp;lt;?php echo $row_Recordset1[&#39;mat_codigo&#39;]; ?&amp;gt;&quot;&amp;gt;^&amp;lt;/a&amp;gt; | &amp;lt;a href=&quot;del_material.php?mat_codigo=&amp;lt;?php echo $row_Recordset1[&#39;mat_codigo&#39;]; ?&amp;gt;&quot;&amp;gt;X&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/tr&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/table&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A parte sublinha é a parte do link.&lt;br /&gt;
no link ele manda para minha pagina &quot;baixar.php&quot; com o&amp;nbsp;parâmetro&amp;nbsp;&quot;file=o nome do arquivo&quot;.&lt;br /&gt;
&lt;br /&gt;
Agora vamos colocar omo funciona o arquivo &quot;baixar.php&quot; pois é ele quem vai fazer o Download.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhELz1Q7CbpgSMrrEVsg9Xy_sda6KO5M2bHbDJRb0N4nYbIBjJJqL_KAipDJGj-66fMUrq-sltiY6SBZfJS11EmmkQrKtFSN3i9coIYcFJG2gB9IDIJFn7a7QxfdQ8t8DYxrH5tT_ms7rxx/s1600/baixar.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;152&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhELz1Q7CbpgSMrrEVsg9Xy_sda6KO5M2bHbDJRb0N4nYbIBjJJqL_KAipDJGj-66fMUrq-sltiY6SBZfJS11EmmkQrKtFSN3i9coIYcFJG2gB9IDIJFn7a7QxfdQ8t8DYxrH5tT_ms7rxx/s320/baixar.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Código:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
$pasta = &#39;ftp&#39;; &amp;nbsp;// nome da pasta no seu FTP , na onde os arquivos foram guardados&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
if(isset($_GET[&#39;file&#39;]) &amp;amp;&amp;amp; file_exists(&quot;{$pasta}/&quot;.$_GET[&#39;file&#39;]))&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
{&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; $file = $_GET[&#39;file&#39;]; // variavle que pega o nome do arquivo que deseja fazer o download&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; $type = filetype(&quot;{$pasta}/{$file}&quot;); //pega o tipo do arquivo que deseja fazer o download&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; $size = filesize(&quot;{$pasta}/{$file}&quot;); // pega o tamanho do arquivo do arquivo&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; header(&quot;Content-Description:File Transfer&quot;); //descriptografando para fazer o download&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; header(&quot;Content-Type:($type)&quot;); &amp;nbsp;// pegando o tipo&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; header(&quot;Content-lenght:($size)&quot;); // pegando o tamanho&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; header(&quot;Content-Disposition: attachment; filename=$file&quot;); //verificando e inicializando o downlaod&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; readfile(&quot;{$pasta}/{$file}&quot;); //fazendo o download&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; exit; // saindo&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
}&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Bom pessoal este foi o post de hoje,&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
qualquer duvida só&amp;nbsp;comentar&amp;nbsp;reponderei o mais&amp;nbsp;rápido.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
bom domingo para todos.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Felipe Eleoterio&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blogdoeleoterio.blogspot.com/feeds/3995601808170882117/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://blogdoeleoterio.blogspot.com/2011/11/download-de-arquivos-do-ftp.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8114129964535350146/posts/default/3995601808170882117'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8114129964535350146/posts/default/3995601808170882117'/><link rel='alternate' type='text/html' href='http://blogdoeleoterio.blogspot.com/2011/11/download-de-arquivos-do-ftp.html' title='Download de arquivos do FTP'/><author><name>Felipe Eleoterio</name><uri>http://www.blogger.com/profile/12908994114810532505</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgM-A2rKYq3VviiWASflHA3E0enEqEy31E9B2LDSJEEy3wugms9595z4wiAQoORnYoY-D35LZmiM_ojmQosbl7p-qWQolFAnQgKLcGHrJDiIWLvcfz3zG7J5K_w0xgFZw/s220/1013631_626368350823468_457855547827338277_n.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidZJ9I2lwGX0Y_FQHY_oiEW6SWOT9ilfg4P59eh5TLXu_m-g5Z-9sXh62TFFUQrowZcdH3eo7gY375k35mKcxTDs3w9HFa8GqegZzEwDQT_tX8nU2Z4y2juhbXlU-iGKHpNqJRZrMt2SEx/s72-c/links.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8114129964535350146.post-6287259694227400638</id><published>2011-11-19T05:41:00.001-08:00</published><updated>2011-11-19T05:51:59.950-08:00</updated><title type='text'>GET/SET - C#</title><content type='html'>Bom este é o jeito mais&amp;nbsp;fácil&amp;nbsp;para fazer um get/set e o&amp;nbsp;método&amp;nbsp;construtor em C# , no Visual&amp;nbsp;Studio&amp;nbsp;2010 tem outro modelo e que irá ser meu&amp;nbsp;próximo&amp;nbsp;post.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-Al5xMTWsL4CvCDIWD75f7XjYY5UClpMU98TKf8qTwJ1afrLfkxnGhvqhWxuyIJf8CPfsUHZ4mEQNhiWvtZbXwFQMW5v_CLB7lTwoAwz5ltusaSPSkLw_ZVmBUDmnwnz6qWLt9lKBtg_u/s1600/acao.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;220&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-Al5xMTWsL4CvCDIWD75f7XjYY5UClpMU98TKf8qTwJ1afrLfkxnGhvqhWxuyIJf8CPfsUHZ4mEQNhiWvtZbXwFQMW5v_CLB7lTwoAwz5ltusaSPSkLw_ZVmBUDmnwnz6qWLt9lKBtg_u/s320/acao.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Código detalhado:&lt;br /&gt;
&lt;br /&gt;
namespace netuno_aplicação// Nome da Aplicação&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public class Jur_acao// Nome da Classe&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int cod_acao; //&amp;nbsp;Variável&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string des_acao;//Variável&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //---&amp;nbsp;Métodos&amp;nbsp;Construtor criar 2 um com as&amp;nbsp;variáveis&amp;nbsp;e outro sem&amp;nbsp;parâmetro, com o mesmo nome da classe&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public Jur_acao(int cod_acao, string des_acao)// Colocar como&amp;nbsp;parâmetro&amp;nbsp;todos as&amp;nbsp;variáveis&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // faça isso com todos as variaveis&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.cod_acao = cod_acao;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.des_acao = des_acao;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public Jur_acao() //sem Parametro&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //----&lt;br /&gt;
&amp;nbsp;&amp;nbsp;//get/set - é criado automaticamente...seleciona a variavel e com o atalho &quot;ctrl+R+ctrl+E&quot; ele adicionara sozinho;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public int Cod_acao&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; get { return cod_acao; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; set { cod_acao = value; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public string Des_acao&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; get { return des_acao; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; set { des_acao = value; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
qualquer duvida comente responderei mai&amp;nbsp;rápido&amp;nbsp;possível.&lt;br /&gt;
&lt;br /&gt;
ate mais, Felipe Eleoterio.&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://blogdoeleoterio.blogspot.com/feeds/6287259694227400638/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://blogdoeleoterio.blogspot.com/2011/11/getset-c.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8114129964535350146/posts/default/6287259694227400638'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8114129964535350146/posts/default/6287259694227400638'/><link rel='alternate' type='text/html' href='http://blogdoeleoterio.blogspot.com/2011/11/getset-c.html' title='GET/SET - C#'/><author><name>Felipe Eleoterio</name><uri>http://www.blogger.com/profile/12908994114810532505</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgM-A2rKYq3VviiWASflHA3E0enEqEy31E9B2LDSJEEy3wugms9595z4wiAQoORnYoY-D35LZmiM_ojmQosbl7p-qWQolFAnQgKLcGHrJDiIWLvcfz3zG7J5K_w0xgFZw/s220/1013631_626368350823468_457855547827338277_n.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-Al5xMTWsL4CvCDIWD75f7XjYY5UClpMU98TKf8qTwJ1afrLfkxnGhvqhWxuyIJf8CPfsUHZ4mEQNhiWvtZbXwFQMW5v_CLB7lTwoAwz5ltusaSPSkLw_ZVmBUDmnwnz6qWLt9lKBtg_u/s72-c/acao.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8114129964535350146.post-6297986713775671722</id><published>2011-11-18T16:35:00.000-08:00</published><updated>2011-11-18T16:36:37.685-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="links retirados do www.google.com.br"/><title type='text'>CRUD C#</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot;   style=&quot;color: rgb(19, 51, 116);   font-family:Verdana, Helvetica, sans-serif;font-size:medium;&quot;&gt;&lt;table align=&quot;left&quot; cellpadding=&quot;1&quot; cellspacing=&quot;5&quot; border=&quot;0&quot; style=&quot;font-family: Verdana, Helvetica, sans-serif; text-decoration: none; &quot;&gt;&lt;tbody style=&quot;font-family: Verdana, Helvetica, sans-serif; text-decoration: none; &quot;&gt;&lt;tr style=&quot;font-family: Verdana, Helvetica, sans-serif; text-decoration: none; &quot;&gt;&lt;td align=&quot;left&quot; style=&quot;font-family: Verdana, Helvetica, sans-serif; text-decoration: none; font-size: 7pt; &quot;&gt;&lt;div class=&quot;message_body_read_text&quot; style=&quot;font-family: Verdana, Helvetica, sans-serif; text-decoration: none; &quot;&gt;&lt;pre style=&quot;font-family: Verdana, Helvetica, sans-serif; text-decoration: none; font-size: 14px !important; &quot;&gt;Para aqueles que estão iniciando em C# dois otimos link para ensinar fazer um CRUD&lt;/pre&gt;&lt;pre style=&quot;font-family: Verdana, Helvetica, sans-serif; text-decoration: none; font-size: 14px !important; &quot;&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: Verdana, Helvetica, sans-serif; text-decoration: none; font-size: 14px !important; &quot;&gt;&lt;a href=&quot;http://www.macoratti.net/10/04/ef_crdb1.htm&quot; target=&quot;_blank&quot; style=&quot;font-family: Verdana, Helvetica, sans-serif; text-decoration: none; &quot;&gt;http://www.macoratti.net/10/04/ef_crdb1.htm&lt;/a&gt;  &lt;/pre&gt;&lt;pre style=&quot;font-family: Verdana, Helvetica, sans-serif; text-decoration: none; font-size: 14px !important; &quot;&gt;&lt;a href=&quot;http://www.codeproject.com/KB/database/CRUDFormSDevelopPSQL.aspx&quot; target=&quot;_blank&quot; style=&quot;font-family: Verdana, Helvetica, sans-serif; text-decoration: none; &quot;&gt;http://www.codeproject.com/KB/database/CRUDFormSDevelopPSQL.aspx&lt;/a&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://blogdoeleoterio.blogspot.com/feeds/6297986713775671722/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://blogdoeleoterio.blogspot.com/2011/11/crud-c.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8114129964535350146/posts/default/6297986713775671722'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8114129964535350146/posts/default/6297986713775671722'/><link rel='alternate' type='text/html' href='http://blogdoeleoterio.blogspot.com/2011/11/crud-c.html' title='CRUD C#'/><author><name>Felipe Eleoterio</name><uri>http://www.blogger.com/profile/12908994114810532505</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgM-A2rKYq3VviiWASflHA3E0enEqEy31E9B2LDSJEEy3wugms9595z4wiAQoORnYoY-D35LZmiM_ojmQosbl7p-qWQolFAnQgKLcGHrJDiIWLvcfz3zG7J5K_w0xgFZw/s220/1013631_626368350823468_457855547827338277_n.jpg'/></author><thr:total>0</thr:total></entry></feed>