Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include('funcoes.php');
- $host = 'hpduel.com';
- $user = 'hpduel';
- $pass = '123456';
- $conecta = ftp_connect($host);
- $logar = ftp_login($conecta, $user, $pass);
- if($logar == true){
- echo "Você está logado!";
- formulario();
- }else{
- echo "Erro ao conectar
- ";
- }
- if(isset($_POST["ok"])){
- $nome_local = $_FILE["arquivo"];
- $nome_remote = $_FILE["arquivo"]["name"];
- if(ftp_put($conecta, $nome_remote, $nome_local, FTP_ASCII)){
- echo "Enviou o arquivo $nome_local
- ";
- }else{
- echo "Erro ao enviar $nome_local para $host
- ";
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement