goede dag,
ik heb een php script maar volgens mijn hosting provider is er misbruik van gemaakt en daardoor spam mee verstuurd.
nu vroeg ik me af hoe ik het dan veiliger kan maken, kan iemand me daarmee helpen of is het niet even iets simpels en moet ik me er eerst verder in php verdiepen?
in ieder geval alvast bedankt hier mijn script:
<!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>shout</title>
<style type="text/css">
<!--
#Layer1 {
position:absolute;
width:240px;
height:140px;
z-index:1;
left: 0;
top: 0;
background-color: #333333;
}
#Layer2 {
position:relative;
width:30px;
height:20px;
z-index:2;
background-color: #000000;
padding-top: 5px;
}
.style2 {
font-family: "Trebuchet MS", "Times New Roman", Times, serif;
color: #888;
font-size: 0.8em;
}
-->
</style>
</head>
<body>
<?php
if($_POST['formID']=='contact') {
@extract($_POST);
$naam = stripslashes($naam);
$mail = stripslashes($mail);
$sectie = stripslashes($sectie);
$bericht = $naam." <".$mail."> schreef:\r\n\r\n ".stripslashes($bericht);
$onderwerp = "Contact: afdeling ".$sectie;
mail('[email protected]',$onderwerp,$bericht,"From: $mail");
echo '<META HTTP-EQUIV="Refresh" Content="0; URL=succes.php?formID=contact">';
} elseif($_POST['formID']=='signup') {
@extract($_POST);
$vnaam = stripslashes($vnaam);
$anaam = stripslashes($anaam);
$geb = stripslashes($geb);
$adres = stripslashes($adres);
$woonplaats = stripslashes($woonplaats);
$tel = stripslashes($tel);
$mail = stripslashes($mail);
$talent = stripslashes($talent);
$instrukeus = stripslashes($instrukeus);
$instru = stripslashes($instru);
//$demo = stripslashes($demo);
$motivatie = stripslashes($motivatie);
if($instrukeus=="ja"){
$instrumenten .= " ".$checkbox1.", ".$checkbox2.", ".$checkbox3.", ".$checkbox4.". Andere: ".$instruanders;
}
$bericht =
"Voornaam ".$vnaam. "\r\n" .
"Achternaam ".$anaam. "\r\n" .
"Geb. datum ".$geb. "\r\n" .
"Adres ".$adres. "\r\n" .
"Woonplaats ".$woonplaats. "\r\n" .
"\r\n" .
"Tel ".$tel. "\r\n" .
"Mail ".$mail. "\r\n" .
"\r\n" .
"Talentvorm ".$talent. "\r\n" .
"Speelt instr. ".$instrukeus.": ".$instrumenten. "\r\n".
"Link demo ".$demo. "\r\n".
"Motivatie ".$motivatie."\r\n"
;
mail('[email protected]',"sign-up: $vnaam $anaam",$bericht,"$mail");
echo '<META HTTP-EQUIV="Refresh" Content="0; URL=succes.php?formID=signup">';
} elseif($_POST['formID']=='studio') {
@extract($_POST);
$vnaam = stripslashes($vnaam);
$anaam = stripslashes($anaam);
$geb = stripslashes($geb);
$woonplaats = stripslashes($woonplaats);
$vocalen = stripslashes($vocalen);
$tel = stripslashes($tel);
$mail = stripslashes($mail);
$talent = stripslashes($talent);
$instrukeus = stripslashes($instrukeus);
$instru = stripslashes($instru);
//$demo = stripslashes($demo);
$motivatie = stripslashes($motivatie);
$bericht =
"Voornaam ".$vnaam. "\r\n" .
"Artiest ".$anaam. "\r\n" .
"Geb ".$geb. "\r\n" .
"Woonplaats ".$woonplaats. "\r\n" .
"\r\n" .
"Vocalen ".$vocalen."\r\n".
"Dagen ".$dag1." om ".$tijd1." | ".$dag2." om ".$tijd2."\r\n".
"\r\n" .
"Tel ".$tel. "\r\n" .
"Mail ".$mail. "\r\n" .
"\r\n" .
"Bijzonderheden".$bijz."\r\n"
;
mail('[email protected]',"studio: $anaam $vocalen",$bericht,"$mail");
echo '<META HTTP-EQUIV="Refresh" Content="0; URL=succes.php?formID=signup">';
}
?>
<div id="Layer1">
<div align="center"> <br />
<br />
<br />
<div id="Layer2">
<img src="w8_black.gif" width="16" height="16" />
</div>
<br />
<span class="style2">Wordt verwerkt.... </span>
<p> </p>
</div>
</div>
</body>
</html>
311 views