Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

marciach

[Resolvido] DreamWeaver x PHP

Recommended Posts

Oi tudo bem ?? estou com um problema estranho !!!estou recebendo umas mensagens estranhas do meu formulario:

"""

Nome:Rebekah Pugh

Email:itzeox@zxsdg.com

Mensagem:yq4neo7wbl64mqa3

<a href= http://hzcevowob.com >itpiw cvhb</a>

http://dulxhrnq.com

<a href= http://hddimxja.com >gwjjyb aygqqoa</a>

http://vdzbtud.com

<a href= http://wlgbftbx.com >diyffp kfrwk</a>

http://uhgtrtlz.com

<a href= http://ybrormvxpcfu.com >enujqp uetjgv</a>

http://qhbjpjqom.com

 

""""

nao sei por que isso esta acotecendo, esta funcionando normal meu formulario, vou colcoar abaixo o codigo qeu eu utilizo em Html e em PHP para você´s darem uma olhada !!!

 

Do Contato.html

 

<!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>Personal Portfolio - Marcia Hack ::: Web Designer</title>
<link href="geral.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/JavaScript">
function validar() {
var valido = false;

with(document.formulario) {
if (nome.value.length == 0){
valido = false;
nome.focus();
alert ('Campo nome obrigatório.');

}else if(email.value.length == 0) {
valido = false;
email.focus();
alert ('Campo email obrigatório.');

}else if(mensagem.value.length == 0) {
valido = false;
mensagem.focus();
alert ('Campo assunto obrigatório.');


}else {
valido = true;
submit();
} 
return valido;
} 
}

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_validateForm() { //v4.0
var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
if (val) { nm=val.name; if ((val=val.value)!="") {
if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
if (p<1 || p==(val.length-1)) errors+=' '+nm+'.\n';
} else if (test!='R') { num = parseFloat(val);
if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
min=test.substring(8,p); max=test.substring(p+1);
if (num<min || max<num) errors+=' '+nm+' must contain a number between '+min+' and '+max+'.\n';
} } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
} if (errors) alert('Preencha corretamente o campo'+errors);
document.MM_returnValue = (errors == '');
}
//-->
</script>



<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;

}

a:link { font-family :verdana; font-size:13; font-weight: bold; text-decoration: none; color: #CCCCCC }
a:visited { font-family :verdana; font-size:13;font-weight: bold; text-decoration: none; color: #cccccc }
a:hover { font-family :verdana; font-size:13;font-weight: bold; text-decoration: none; color: #0066cc } 

#topo{
position:absolute;
width:778px;
height:179px;
left: 0px;
top: 0px;
}

#titulo{
position:absolute;
width:374px;
height:48px;
top:0px;
left:0px;
}

#menu_lado{
position:absolute; 
width:24px;
height:179px;
top:0px;
left:418px;
}

#rodape1 {
position:absolute;
height:20px;
width:778px;
left: 0px;
top:395px;

} 
#menu_home{
position:absolute; 
height:26px;
width:189px;
top:22px;
left:442px;

}

#menu_curric {
position:absolute;
height:26px;
width:189px;
left:442px;
top:48px;
}

#menu_port {
position:absolute; 
height:26px;
width:189px;
left:442px;
top:74px;
}

#menu_contato {
position:absolute; 
height:26px;
width:189px;
left:442px;
top:100px;
}


#meio{
position:absolute; 
height:400px;
width:778px;
left:0px;
top:179px;
}

#meio_form{
position:absolute; 
height:200px;
width:550px;
left:0px;
top:180px;
padding-top:60px;
padding-left:40px;
padding-right:30px;
padding-bottom:10px;

}

#meio_texto{
position:absolute; 
height:600px;
width:778px;
left:0px;
top:180px;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
font-style: normal;
color: #0066cc;
text-align: justify;


}

#rodape {
position:absolute;
height:20px;
width:778px;
left: 0px;

} 
#texto_curric{
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
font-style: normal;
line-height: normal;
color: #0066cc;
text-decoration: none;
text-align: justify;
height:700px;
width: 600px;
padding-top:20px;
padding-left:20px;
padding-right:10px;
background-repeat: no-repeat;
}

.sub_titulo {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
font-style: normal;
line-height: normal;
color: #666666;
text-align: justify;

}

.titulo {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 15px;
font-style: italic;
line-height: normal;
color: #0066cc;
text-align: justify;
font-weight: bold;

}

.titu {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
font-style: normal;
line-height: normal;
color: #666666;
text-align: justify;
font-weight: bold;

}

#fotos{
z-index:1;
position:absolute; 
left:25px; 
top:25px; 
width:100; 
height:326px; 
}

#ampliado{
position:absolute; 
left:177px; 
top:7px; 
width:453px; 
height:342px; 
z-index:2;

}

.form1{font-family: verdana; /*caixas de texto e texto */
font-size:11px;
color:#0066cc;
border-right: 1px solid #006699; 
border-bottom: 1px solid #006699; 
border-top: 1px solid #006699; 
border-left: 1px solid #006699; 
width:200px;
}


.caixa_text{font-family: verdana; /*caixas de texto e texto */
font-size:11px;
color:#0066cc;
border-right: 1px solid #006699; 
border-bottom: 1px solid #006699; 
border-top: 1px solid #006699; 
border-left: 1px solid #006699; 
width:200px;
height:60px;
}

.btform{font-family: verdana; 
font-size:11px;
color:#3399cc;
border-right: 1px solid #006699; 
border-bottom: 1px solid #006699; 
border-top: 1px solid #006699; 
border-left: 1px solid #006699; 
width:60px;
background:#FFFFFF;
}

.txt { font-family: Verdana, Arial, Helvetica, sans-serif; /* campo*/
font-size: 11px; 
color: #0099CC}


body { font-family: Tahoma, Verdana, Arial; 
font-size: 8pt; 
color="#FFFFFF"
}

td { font-size: 8pt; 
}

.imput { font-family: Tahoma, Verdana, Arial; color="#000000";
font-size: 10pt; 
font-weight:bold; 
background-color: #000066; 
border-color:#000066; 
border-style: solid; 
border-top-width: 1px; 
border-right-width: 1px; 
border-bottom-width: 1px; 
border-left-width: 1px;
}

#texto_envio {
font-family: Verdana, Arial, Helvetica, sans-serif; /* campo*/
font-size: 14px; 
color: #0099CC;
text-align: center;
font-weight: bold;
left:0px;
top:180px;
height:300px;
width: 600px;
padding-top:80px;
padding-left:80px;
padding-right:40px;
padding-bottom:40px;


}

.justify { text-align: justify;
}

td {
font-family: Arial, Helvetica, sans-serif;
}

th {
font-family: Arial, Helvetica, sans-serif;

-->
</style>

</head>

<body onload="document.formulario.nome.focus()">

<div id="geral">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="778" height="179">
<param name="movie" value="img/layout4.swf" />
<param name="quality" value="high" />
<embed src="img/layout4.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="778" height="179"></embed>
</object>
<div id="meio_form">

<table width="100%" border="0" cellspacing="4" cellpadding="0">
<form method="post" action="formulario.php" name="formulario" id="formulario" onsubmit="return validar();">


<tr> 
<td width="100" height="21" class="txt">Nome:</td>
<td height="21"> 
<input type="text" name="nome" class="form1"> </td>
</tr>
<tr> 
<td width="100" height="21" class="txt">E-mail:</td>
<td height="21"> 
<input type="text" name="email" class="form1" onBlur="MM_validateForm('email','','NisEmail');return document.MM_returnValue" size="30"> </td>
</tr>


<tr> 
<td width="100" height="91" class="txt">Mensagens:</td>
<td height="91"> 
<textarea name="mensagem" class="caixa_text"></textarea> </td>
</tr>
<tr> 
<td width="100" class="txt"></td>
<td> 
<table width="200" border="0" cellspacing="0" cellpadding="0">
<tr> 
<td width="62%"> 
<input type="submit" name="Submit" value="Enviar" class="btform"> </td>
<td width="38%"> 
<input type="reset" name="Submit2" value="Limpar" class="btform"> </td>
</tr>
</table> </td>
</tr>
</form>
</table>

<div id="rodape1"><img src="img/rodape.jpg"></div>
</div>
</div> 

</div>
</body>
</html>

do formulario.php

 

<!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>Personal Portfolio - Marcia Hack ::: Web Designer</title>
<link href="geral.css" rel="stylesheet" type="text/css">

<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;

}



a:link { font-family :verdana; font-size:13; font-weight: bold; text-decoration: none; color: #CCCCCC }
a:visited { font-family :verdana; font-size:13;font-weight: bold; text-decoration: none; color: #cccccc }
a:hover { font-family :verdana; font-size:13;font-weight: bold; text-decoration: none; color: #0066cc } 

#topo{
position:absolute;
width:778px;
height:179px;
left: 0px;
top: 0px;
}

#titulo{
position:absolute;
width:374px;
height:48px;
top:0px;
left:0px;
}

#menu_lado{
position:absolute; 
width:24px;
height:179px;
top:0px;
left:418px;
}

#menu_home{
position:absolute; 
height:26px;
width:189px;
top:22px;
left:442px;

}

#menu_curric {
position:absolute;
height:26px;
width:189px;
left:442px;
top:48px;
}

#menu_port {
position:absolute; 
height:26px;
width:189px;
left:442px;
top:74px;
}

#menu_contato {
position:absolute; 
height:26px;
width:189px;
left:442px;
top:100px;
}


#meio{
position:absolute; 
height:400px;
width:778px;
left:0px;
top:179px;
}

#meio_form{
position:absolute; 
height:200px;
width:550px;
left:0px;
top:180px;
padding-top:60px;
padding-left:40px;
padding-right:30px;
padding-bottom:10px;

}

#meio_texto{
position:absolute; 
height:600px;
width:778px;
left:0px;
top:180px;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
font-style: normal;
color: #0066cc;
text-align: justify;


}

#rodape1 {
position:absolute;
height:20px;
width:778px;
left: 0px;
top:395px;

} 

#rodape {
position:absolute;
height:20px;
width:778px;
left: 0px;

} 
#texto_curric{
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
font-style: normal;
line-height: normal;
color: #0066cc;
text-decoration: none;
text-align: justify;
height:700px;
width: 600px;
padding-top:20px;
padding-left:20px;
padding-right:10px;
background-repeat: no-repeat;
}

.sub_titulo {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
font-style: normal;
line-height: normal;
color: #666666;
text-align: justify;

}

.titulo {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 15px;
font-style: italic;
line-height: normal;
color: #0066cc;
text-align: justify;
font-weight: bold;

}

.titu {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
font-style: normal;
line-height: normal;
color: #666666;
text-align: justify;
font-weight: bold;

}

#fotos{
z-index:1;
position:absolute; 
left:25px; 
top:25px; 
width:100; 
height:326px; 
}

#ampliado{
position:absolute; 
left:177px; 
top:7px; 
width:453px; 
height:342px; 
z-index:2;

}

.form1{font-family: verdana; /*caixas de texto e texto */
font-size:11px;
color:#0066cc;
border-right: 1px solid #006699; 
border-bottom: 1px solid #006699; 
border-top: 1px solid #006699; 
border-left: 1px solid #006699; 
width:200px;
}


.caixa_text{font-family: verdana; /*caixas de texto e texto */
font-size:11px;
color:#0066cc;
border-right: 1px solid #006699; 
border-bottom: 1px solid #006699; 
border-top: 1px solid #006699; 
border-left: 1px solid #006699; 
width:200px;
height:60px;
}

.btform{font-family: verdana; 
font-size:11px;
color:#3399cc;
border-right: 1px solid #006699; 
border-bottom: 1px solid #006699; 
border-top: 1px solid #006699; 
border-left: 1px solid #006699; 
width:60px;
background:#FFFFFF;
}

.txt { font-family: Verdana, Arial, Helvetica, sans-serif; /* campo*/
font-size: 11px; 
color: #0099CC}



body { font-family: Tahoma, Verdana, Arial; 
font-size: 8pt; 
color="#FFFFFF"
}

td { font-size: 8pt; 
}

.imput { font-family: Tahoma, Verdana, Arial; color="#000000";
font-size: 10pt; 
font-weight:bold; 
background-color: #000066; 
border-color:#000066; 
border-style: solid; 
border-top-width: 1px; 
border-right-width: 1px; 
border-bottom-width: 1px; 
border-left-width: 1px;
}

#texto_envio {
font-family: Verdana, Arial, Helvetica, sans-serif; /* campo*/
font-size: 14px; 
color: #0099CC;
text-align: center;
font-weight: bold;
left:0px;
top:180px;
height:300px;
width: 600px;
padding-top:80px;
padding-left:80px;
padding-right:40px;
padding-bottom:40px;


}

.justify { text-align: justify;
}

td {
font-family: Arial, Helvetica, sans-serif;
}

th {
font-family: Arial, Helvetica, sans-serif;

-->
</style>
</head>

<body>
<?php 

$mensagem = "Nome:".$_POST['nome']." \n";
$mensagem .= "Email:".$_POST['email']." \n";
$mensagem .= "Mensagem:". $_POST['mensagem'];


mail("marciach19@bol.com.br", "Formulario de Contato", $mensagem);

?> 
<div id="geral">
<div id="meio_texto"> 
<div id="texto_envio"> E-mail enviado com sucesso !!!! </div>
<div id="rodape1"><img src="img/rodape.jpg"></div>
</div>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="778" height="179">
<param name="movie" value="img/layout4.swf" />
<param name="quality" value="high" />
<embed src="img/layout4.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="778" height="179"></embed>
</object>
</body>
</html>
o que pode esta acotecendo ??

 

obrigada pela atencao

Marcia Hack

Compartilhar este post


Link para o post
Compartilhar em outros sites

Oi! marciach

 

o que você pode está fazendo é tratar os dados a serem enviados pelo php, assim você tera uma maior segurança evitando os boots.

 

http://www.google.com/search?hl=pt-BR&...php&spell=1

 

exemplo strip_tags

 

http://www.php.net/strip_tags

 

exemplo de tratamento no servidor

 

strip_tags($_POST['nome']);

mas não é só isso, faça uma verificação também no servidor assim voce elemina os erros que o javascript não pega e bons estudos http://forum.imasters.com.br/public/style_emoticons/default/thumbsup.gif

Compartilhar este post


Link para o post
Compartilhar em outros sites

Oiee tudo bem ?? fiz aquilo qeu você falou no php, agora o e-mail aparece assim:

 

Nome:Ervin Petty

Email:rbqtq@edoksm.com

Mensagem:yq4neo7wbl64mqa3

gjsxflb dfen

http://xdudjkrnm.com

oylrh mxfklrrf

http://reclxfoh.com

qizfhfz zptbaemn

http://beptlfhkfolq.com

mpmnpu sgrnpxv

http://cojjgnxtd.com

 

 

**PHP***

<?php

 

$mensagem = "Nome:".strip_tags($_POST['nome'])." \n";

$mensagem .= "Email:".strip_tags($_POST['email'])." \n";

$mensagem .= "Mensagem:".strip_tags($_POST['mensagem'])." \n";

 

 

mail("marciach@uol.com.br", "Formulario de Contato", $mensagem);

 

?>

 

obrigada pela atencao

Marcia

Compartilhar este post


Link para o post
Compartilhar em outros sites

Cara marcia,

Não entendi bem sua duvida,poderia explicar melhor?

E poderia reoorganizar seus codes tirando trechos desnecessários para uma melhor visualização e interpretação?

Abraço!

Compartilhar este post


Link para o post
Compartilhar em outros sites

Oiee tudo bem ?? claroo vou ver se me explico melhor, antes meu formulario funcionava muito bemm agora estou recebendo umas mensagens estranhas.....

 

"" Nome:Rebekah Pugh

Email:itzeox@zxsdg.com

Mensagem:yq4neo7wbl64mqa3

<a href= http://hzcevowob.com >itpiw cvhb</a>

http://dulxhrnq.com

<a href= http://hddimxja.com >gwjjyb aygqqoa</a>

http://vdzbtud.com

<a href= http://wlgbftbx.com >diyffp kfrwk</a>

http://uhgtrtlz.com

<a href= http://ybrormvxpcfu.com >enujqp uetjgv</a>

http://qhbjpjqom.com

 

"""

 

meu codigo em PHP

 

<?php

 

$mensagem = "Nome:".$_POST['nome']." \n";

$mensagem .= "Email:".$_POST['email']." \n";

$mensagem .= "Mensagem:". $_POST['mensagem'];

 

 

mail("marciach@uol.com.br", "Formulario de Contato", $mensagem);

 

?>

 

o que sera que pode estar acontecendo, o codigo funcionava legal so agora qeu estou recebendo essas mensagens estranhas, sera qeu isso pode ser problema no servidor de email de onde meu site esta hospedado ?

 

obrigada pela atencao

Marcia

Compartilhar este post


Link para o post
Compartilhar em outros sites

Oiee tudo bem ?? claroo vou ver se me explico melhor, antes meu formulario funcionava muito bemm agora estou recebendo umas mensagens estranhas.....

 

"" Nome:Rebekah Pugh

Email:itzeox@zxsdg.com

Mensagem:yq4neo7wbl64mqa3

<a href= http://hzcevowob.com >itpiw cvhb</a>

http://dulxhrnq.com

<a href= http://hddimxja.com >gwjjyb aygqqoa</a>

http://vdzbtud.com

<a href= http://wlgbftbx.com >diyffp kfrwk</a>

http://uhgtrtlz.com

<a href= http://ybrormvxpcfu.com >enujqp uetjgv</a>

http://qhbjpjqom.com

 

"""

 

meu codigo em PHP

 

<?php

 

$mensagem = "Nome:".$_POST['nome']." \n";

$mensagem .= "Email:".$_POST['email']." \n";

$mensagem .= "Mensagem:". $_POST['mensagem'];

 

 

mail("marciach@uol.com.br", "Formulario de Contato", $mensagem);

 

?>

 

o que sera que pode estar acontecendo, o codigo funcionava legal so agora qeu estou recebendo essas mensagens estranhas, sera qeu isso pode ser problema no servidor de email de onde meu site esta hospedado ?

 

obrigada pela atencao

Marcia

Compartilhar este post


Link para o post
Compartilhar em outros sites

Não sei se deve ser isso! mas verifique se existe algum arquivo desconhecido em seu servidor, pode ser que esteja infectado por algum malware

 

Caso não filtre seu código de php

Compartilhar este post


Link para o post
Compartilhar em outros sites

Não sei se deve ser isso! mas verifique se existe algum arquivo desconhecido em seu servidor, pode ser que esteja infectado por algum malware

 

Caso não filtre seu código de php

oiee tudo bem ??? filtrar mais o codigo, como assim ??? o codigo do PHP esta correto ??

 

obrigada pela atencao

Marcia

Compartilhar este post


Link para o post
Compartilhar em outros sites

Está correto sim!

Não entendo porque estão aparecendo tais strings estranhas.

Faça o que o amigo acima disse (parte).

Abraço!

Compartilhar este post


Link para o post
Compartilhar em outros sites

Está correto sim!

Não entendo porque estão aparecendo tais strings estranhas.

Faça o que o amigo acima disse (parte).

Abraço!

okk, ja fiz isso !! muito obrigada pela atencao de você´s !!! valeu mesmo...

 

abs

Marcia

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.