Ir para conteúdo
Fórum Script Brasil

dyegofern

Membros
  • Total de itens

    6
  • Registro em

  • Última visita

Posts postados por dyegofern

  1. <?

    $email = $_POST['para']; //variável vinda do formulario

    $de = 'Alguém';

    $mens2 = $_POST['mensagem]; //variável vinda do formulario

    $Corpo =

    '

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml">

    <head>

    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

    <title>Untitled Document</title>

    </head>

    <body>

    <table width="760" border="0">

    <tr>

    <td><h3 align="center" >Um texto qualquer</h3>

    </td>

    </tr>

    <tr>

    <td >'.$mens2.'</td>

    </tr>

    <tr>

    <td bgcolor="#CCCCCC"><center >

    Visite nosso Site: <a href="http://www.centauronet.com.br ">http://www.centauronet.com.br </a>

    </center></td>

    </tr>

    </table>

    </body>

    </html>

    ';

    ?>

    <?

    $folder = "/var/w2w/.../../nome_do_arquivo.extensão";

    $fp = fopen($folder,"rb");

    $anexo = fread($fp,filesize($folder));

    $anexo = base64_encode($anexo);

    fclose($fp);

    $anexo = chunk_split($anexo);

    $boundary = "XYZ-" . date("dmYis") . "-ZYX";

    $mens = "--$boundary\n";

    $mens .= "Content-Transfer-Encoding: 8bits\n";

    $mens .= "Content-Type: text/html; charset=\"ISO-8859-1\"\n\n"; //plain

    $mens .= $Corpo."\n";

    $mens .= "--$boundary\n";

    $mens .= "Content-Type: image/jpeg\n";

    $mens .= "Content-Disposition: attachment; filename=\"folder_centauro.jpg\"\n";

    $mens .= "Content-Transfer-Encoding: base64\n\n";

    $mens .= "$anexo\n";

    $mens .= "--$boundary--\r\n";

    $headers = "MIME-Version: 1.0\n";

    $headers .= "From: \"XxXxX\" <$email_from>\r\n";

    $headers .= "Content-type: multipart/mixed; boundary=\"$boundary\"\r\n";

    $headers .= "$boundary\n";

    //envio o email com o anexo

    mail($email,'Folder',$mens,$headers);

    ?>

    <script type="text/javascript">

    alert("Seu email foi enviado com sucesso");

    document.location = 'outrapagina.php';

    </script>

  2. Gostaria muito d ajuda d vocês para consumir um web service. O web service eu já tenho e está funcionando só que em huh.gif ASPX huh.gif , eu quero consumir ele em biggrin.gif PHP laugh.gif , se alguém souber eu agradeço.

    Dyego Fernandes de Sousa

    Centauro Gráfica e Editora

    <<Programador Web - PHP>>

  3. ainda nem teste.. to sem tempo.. aiai

    a coisa ta complicandu

    hehehe

    q seria esse: header("Content-type: image/png"); ???

    Isso quer dizer que o arquivo, (imagino que você está enviando um e-mail ou coisa parecida) é uma imagem do tipo png (fireworks)

    1 Abraaaaço.....

  4. valeu holy!!

    vou tentar aki e voltu com o resultado! ^^

    anão! você conhecendo o PHP e desenvolvendo um site todo em flash? O Flash tem que ser usado moderadamente, não se pode extrapolar demais, segundo pesquisas de órgãos confiáveis 60% dos internautas ainda utiliza conexão discada. PENSE NISSO

×
×
  • Criar Novo...